test-fileio: use test strings that are actually valid in shell

This commit is contained in:
Lennart Poettering 2020-09-11 17:42:46 +02:00
parent 415f8a5bfe
commit 6fe3196350

View file

@ -162,8 +162,8 @@ static void test_parse_multiline_env_file(void) {
assert_se(fmkostemp_safe(t, "w", &f) == 0); assert_se(fmkostemp_safe(t, "w", &f) == 0);
fputs("one=BAR\\\n" fputs("one=BAR\\\n"
" VAR\\\n" "\\ \\ \\ \\ VAR\\\n"
"\tGAR\n" "\\\tGAR\n"
"#comment\n" "#comment\n"
"two=\"bar\\\n" "two=\"bar\\\n"
" var\\\n" " var\\\n"
@ -173,7 +173,7 @@ static void test_parse_multiline_env_file(void) {
" var \\\n" " var \\\n"
"\tgar \"\n", f); "\tgar \"\n", f);
fflush(f); assert_se(fflush_and_check(f) >= 0);
fclose(f); fclose(f);
r = load_env_file(NULL, t, &a); r = load_env_file(NULL, t, &a);