From ce10f20ca7349c5ccdd7679536642fd17d4cbc40 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Mon, 2 Feb 2015 02:01:25 +0100 Subject: [PATCH] test/sharness: improve t0111 using test_cmp License: MIT Signed-off-by: Christian Couder --- test/sharness/t0111-gateway-writable.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/sharness/t0111-gateway-writable.sh b/test/sharness/t0111-gateway-writable.sh index ddaaa21d400..ca0271e897d 100755 --- a/test/sharness/t0111-gateway-writable.sh +++ b/test/sharness/t0111-gateway-writable.sh @@ -30,7 +30,7 @@ test_expect_success "HTTP POST file gives Hash" ' test_expect_success "We can HTTP GET file just created" ' FILEPATH=$(grep Location curl.out | cut -d" " -f3- | tr -d "\r") curl -so outfile http://localhost:5002$FILEPATH && - diff -u infile outfile + test_cmp infile outfile ' test_expect_success "HTTP PUT empty directory" ' @@ -62,7 +62,7 @@ test_expect_success "We can HTTP GET file just created" ' [ "$FILEPATH" = "${FILEPATH%/test.txt}/test.txt" ] && echo "GET http://localhost:5002$FILEPATH" && curl -so outfile http://localhost:5002$FILEPATH && - diff -u infile outfile + test_cmp infile outfile ' 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" ' [ "$FILEPATH" = "${FILEPATH%/test/test.txt}/test/test.txt" ] && echo "GET http://localhost:5002$FILEPATH" && curl -so outfile2 "http://localhost:5002$FILEPATH" && - diff -u infile2 outfile2 && + test_cmp infile2 outfile2 && echo "GET http://localhost:5002${FILEPATH%/test/test.txt}/test.txt" && curl -so outfile "http://localhost:5002${FILEPATH%/test/test.txt}/test.txt" && - diff -u infile outfile + test_cmp infile outfile ' test_kill_ipfs_daemon