test/sharness: "echo -n" bug
In OSX, the `echo -n` was _somehow_ printing "-n" out... not really sure why, as the bsd `echo` program supports -n. I changed this to printf -- which is safer.
Juan Batiz-Benet committed
Jan 28, 2015 at 00:53 UTC
ed168404149164b3ca639b2cfef6e51768a0d04e
1 file changed
+2
-2
test/sharness/t0080-repo.sh
+2
-2
@@ -14,7 +14,7 @@ test_launch_ipfs_daemon
14
test_expect_success "'ipfs add afile' succeeds" '
15
echo "some text" >afile
16
HASH=`ipfs add -q afile`
17
- echo -n $HASH >hashfile
17
+ printf "$HASH" >hashfile
18
'
19
20
test_expect_success "added file was pinned" '
@@ -26,7 +26,7 @@ test_expect_success "'ipfs repo gc' succeeds" '
26
'
27
28
test_expect_success "'ipfs repo gc' looks good (empty)" '
29
- echo -n "" >empty
29
+ printf "" >empty
30
test_cmp empty gc_out_actual
31
'
32