@cryptotaxi247 / kubo / commits / 568676205

t0081: swap test_cmp arguments

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

Christian Couder committed Oct 3, 2015 at 23:49 UTC 5686762055bc1d2773034324817ff5622acdef19
1 file changed +5 -4
test/sharness/t0081-repo-pinning.sh
+5 -4
@@ -98,10 +98,11 @@ test_expect_success "'ipfs add dir' succeeds" '
98 echo "some text 6" >dir1/dir2/dir4/file6 &&
99 echo "some text 2" >dir1/dir3/file2 &&
100 echo "some text 5" >dir1/dir3/file5 &&
101 - ipfs add -q -r dir1 | tail -n1 >actual1 &&
101 + ipfs add -q -r dir1 >actualall &&
102 + tail -n1 actualall >actual1 &&
103 echo "$HASH_DIR1" >expected1 &&
104 ipfs repo gc && # remove the patch chaff
104 - test_cmp actual1 expected1
105 + test_cmp expected1 actual1
106 '
107
108 test_expect_success "objects are there" '
@@ -216,7 +217,7 @@ test_expect_success "'ipfs repo gc' succeeds" '
217 echo "removed $HASH_FILE3" > gc_out_exp2 &&
218 echo "removed $HASH_FILE5" >> gc_out_exp2 &&
219 echo "removed $HASH_DIR3" >> gc_out_exp2 &&
219 - test_sort_cmp gc_out_actual2 gc_out_exp2
220 + test_sort_cmp gc_out_exp2 gc_out_actual2
221 '
222
223 # use object links for HASH_DIR1 here because its children
@@ -231,7 +232,7 @@ test_expect_success "some objects are still there" '
232 ipfs ls "$HASH_DIR4" >>actual8 &&
233 ipfs ls "$HASH_DIR2" >>actual8 &&
234 ipfs object links "$HASH_DIR1" >>actual8 &&
234 - test_cmp actual8 expected8
235 + test_cmp expected8 actual8
236 '
237
238 # todo: make this faster somehow.