From 1ac5db597eca0651b820999c88a47d99801cbafe Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 14 Aug 2010 21:41:46 +0200 Subject: [PATCH] test: Avoid using "echo -n" for portability reasons --- test/test_hashutil.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)); } -- 2.47.3