@cryptotaxi247 / kubo / commits / ce10f20ca

test/sharness: improve t0111 using test_cmp

License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed Feb 2, 2015 at 02:01 UTC ce10f20ca7349c5ccdd7679536642fd17d4cbc40
1 file changed +4 -4
test/sharness/t0111-gateway-writable.sh
+4 -4
@@ -30,7 +30,7 @@ test_expect_success "HTTP POST file gives Hash" '
30 test_expect_success "We can HTTP GET file just created" '
31 FILEPATH=$(grep Location curl.out | cut -d" " -f3- | tr -d "\r")
32 curl -so outfile http://localhost:5002$FILEPATH &&
33 - diff -u infile outfile
33 + test_cmp infile outfile
34 '
35
36 test_expect_success "HTTP PUT empty directory" '
@@ -62,7 +62,7 @@ test_expect_success "We can HTTP GET file just created" '
62 [ "$FILEPATH" = "${FILEPATH%/test.txt}/test.txt" ] &&
63 echo "GET http://localhost:5002$FILEPATH" &&
64 curl -so outfile http://localhost:5002$FILEPATH &&
65 - diff -u infile outfile
65 + test_cmp infile outfile
66 '
67
68 test_expect_success "HTTP PUT file to append to existing hierarchy" '
@@ -81,10 +81,10 @@ test_expect_failure "We can HTTP GET file just created" '
81 [ "$FILEPATH" = "${FILEPATH%/test/test.txt}/test/test.txt" ] &&
82 echo "GET http://localhost:5002$FILEPATH" &&
83 curl -so outfile2 "http://localhost:5002$FILEPATH" &&
84 - diff -u infile2 outfile2 &&
84 + test_cmp infile2 outfile2 &&
85 echo "GET http://localhost:5002${FILEPATH%/test/test.txt}/test.txt" &&
86 curl -so outfile "http://localhost:5002${FILEPATH%/test/test.txt}/test.txt" &&
87 - diff -u infile outfile
87 + test_cmp infile outfile
88 '
89
90 test_kill_ipfs_daemon