Skip to content

Commit

Permalink
Merge pull request #1784 from ipfs/improve-t0081
Browse files Browse the repository at this point in the history
t0081: swap test_cmp arguments
  • Loading branch information
jbenet committed Oct 3, 2015
2 parents 1b79501 + 5686762 commit 3eea954
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/sharness/t0081-repo-pinning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ test_expect_success "'ipfs add dir' succeeds" '
echo "some text 6" >dir1/dir2/dir4/file6 &&
echo "some text 2" >dir1/dir3/file2 &&
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 &&
ipfs repo gc && # remove the patch chaff
test_cmp actual1 expected1
test_cmp expected1 actual1
'

test_expect_success "objects are there" '
Expand Down Expand Up @@ -216,7 +217,7 @@ test_expect_success "'ipfs repo gc' succeeds" '
echo "removed $HASH_FILE3" > gc_out_exp2 &&
echo "removed $HASH_FILE5" >> 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
Expand All @@ -231,7 +232,7 @@ test_expect_success "some objects are still there" '
ipfs ls "$HASH_DIR4" >>actual8 &&
ipfs ls "$HASH_DIR2" >>actual8 &&
ipfs object links "$HASH_DIR1" >>actual8 &&
test_cmp actual8 expected8
test_cmp expected8 actual8
'

# todo: make this faster somehow.
Expand Down

0 comments on commit 3eea954

Please sign in to comment.