diff --git a/test/sharness/t0040-add-and-cat.sh b/test/sharness/t0040-add-and-cat.sh index 86ca3dc9b..2d7815b9f 100755 --- a/test/sharness/t0040-add-and-cat.sh +++ b/test/sharness/t0040-add-and-cat.sh @@ -165,6 +165,16 @@ test_expect_success FUSE,EXPENSIVE "cat ipfs/bigfile looks good" ' test_cmp sha1_expected sha1_actual ' +test_expect_success "ipfs add -w succeeds" ' + ipfs add -w mountdir/hello.txt >actual +' + +test_expect_success "ipfs add -w output looks good" ' + HASH="QmVJfrqd4ogGZME6LWkkikAGddYgh9dBs2U14DHZZUBk7W" && + echo "added "$HASH/hello.txt" mountdir/hello.txt" >expected && + test_cmp expected actual +' + test_kill_ipfs_daemon test_done