]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Avoid using "echo -n" for portability reasons
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 14 Aug 2010 19:41:46 +0000 (21:41 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 14 Aug 2010 19:41:46 +0000 (21:41 +0200)
test/test_hashutil.c

index 210687185e82efdcae9e81fcfaa76a9ee8400f3f..225841a5ad847ce6c38abcf737e39f90d4bec7a4 100644 (file)
@@ -84,8 +84,10 @@ TEST(hash_multicommand_output)
        struct mdfour h1, h2;
        hash_start(&h1);
        hash_start(&h2);
-       CHECK(hash_multicommand_output(&h1, "echo -n foo", "not used"));
-       CHECK(hash_multicommand_output(&h2, "echo -n f; echo -n oo", "not used"));
+       create_file("foo.sh", "#!/bin/sh\necho foo\necho bar\n");
+       chmod("foo.sh", 0555);
+       CHECK(hash_multicommand_output(&h2, "echo foo; echo bar", "not used"));
+       CHECK(hash_multicommand_output(&h1, "./foo.sh", "not used"));
        CHECK(hash_equal(&h1, &h2));
 }