]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-fileio: use test strings that are actually valid in shell
authorLennart Poettering <lennart@poettering.net>
Fri, 11 Sep 2020 15:42:46 +0000 (17:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 14 Sep 2020 09:08:43 +0000 (11:08 +0200)
src/test/test-fileio.c

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