Skip to content

Commit 5686762

Browse files
committedOct 3, 2015
t0081: swap test_cmp arguments
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
1 parent 7e69146 commit 5686762

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎test/sharness/t0081-repo-pinning.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ test_expect_success "'ipfs add dir' succeeds" '
9898
echo "some text 6" >dir1/dir2/dir4/file6 &&
9999
echo "some text 2" >dir1/dir3/file2 &&
100100
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 &&
102103
echo "$HASH_DIR1" >expected1 &&
103104
ipfs repo gc && # remove the patch chaff
104-
test_cmp actual1 expected1
105+
test_cmp expected1 actual1
105106
'
106107

107108
test_expect_success "objects are there" '
@@ -216,7 +217,7 @@ test_expect_success "'ipfs repo gc' succeeds" '
216217
echo "removed $HASH_FILE3" > gc_out_exp2 &&
217218
echo "removed $HASH_FILE5" >> gc_out_exp2 &&
218219
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
220221
'
221222

222223
# use object links for HASH_DIR1 here because its children
@@ -231,7 +232,7 @@ test_expect_success "some objects are still there" '
231232
ipfs ls "$HASH_DIR4" >>actual8 &&
232233
ipfs ls "$HASH_DIR2" >>actual8 &&
233234
ipfs object links "$HASH_DIR1" >>actual8 &&
234-
test_cmp actual8 expected8
235+
test_cmp expected8 actual8
235236
'
236237

237238
# todo: make this faster somehow.

0 commit comments

Comments
 (0)
Please sign in to comment.