1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-28 14:43:11 +08:00

Merge pull request #1784 from ipfs/improve-t0081

t0081: swap test_cmp arguments
This commit is contained in:
Juan Benet
2015-10-03 17:58:31 -04:00

View File

@ -98,10 +98,11 @@ test_expect_success "'ipfs add dir' succeeds" '
echo "some text 6" >dir1/dir2/dir4/file6 && echo "some text 6" >dir1/dir2/dir4/file6 &&
echo "some text 2" >dir1/dir3/file2 && echo "some text 2" >dir1/dir3/file2 &&
echo "some text 5" >dir1/dir3/file5 && echo "some text 5" >dir1/dir3/file5 &&
ipfs add -q -r dir1 | tail -n1 >actual1 && ipfs add -q -r dir1 >actualall &&
tail -n1 actualall >actual1 &&
echo "$HASH_DIR1" >expected1 && echo "$HASH_DIR1" >expected1 &&
ipfs repo gc && # remove the patch chaff ipfs repo gc && # remove the patch chaff
test_cmp actual1 expected1 test_cmp expected1 actual1
' '
test_expect_success "objects are there" ' test_expect_success "objects are there" '
@ -216,7 +217,7 @@ test_expect_success "'ipfs repo gc' succeeds" '
echo "removed $HASH_FILE3" > gc_out_exp2 && echo "removed $HASH_FILE3" > gc_out_exp2 &&
echo "removed $HASH_FILE5" >> gc_out_exp2 && echo "removed $HASH_FILE5" >> gc_out_exp2 &&
echo "removed $HASH_DIR3" >> gc_out_exp2 && echo "removed $HASH_DIR3" >> gc_out_exp2 &&
test_sort_cmp gc_out_actual2 gc_out_exp2 test_sort_cmp gc_out_exp2 gc_out_actual2
' '
# use object links for HASH_DIR1 here because its children # use object links for HASH_DIR1 here because its children
@ -231,7 +232,7 @@ test_expect_success "some objects are still there" '
ipfs ls "$HASH_DIR4" >>actual8 && ipfs ls "$HASH_DIR4" >>actual8 &&
ipfs ls "$HASH_DIR2" >>actual8 && ipfs ls "$HASH_DIR2" >>actual8 &&
ipfs object links "$HASH_DIR1" >>actual8 && ipfs object links "$HASH_DIR1" >>actual8 &&
test_cmp actual8 expected8 test_cmp expected8 actual8
' '
# todo: make this faster somehow. # todo: make this faster somehow.