From: Joel Rosdahl Date: Sat, 14 Aug 2010 19:41:46 +0000 (+0200) Subject: test: Avoid using "echo -n" for portability reasons X-Git-Tag: v3.1~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ac5db597eca0651b820999c88a47d99801cbafe;p=thirdparty%2Fccache.git test: Avoid using "echo -n" for portability reasons --- diff --git a/test/test_hashutil.c b/test/test_hashutil.c index 210687185..225841a5a 100644 --- a/test/test_hashutil.c +++ b/test/test_hashutil.c @@ -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)); }