From 54fef5ea96bf513c6a4e85d9f13b3184205f0bef Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Sat, 31 Jan 2015 19:29:26 -0800 Subject: [PATCH] test/sharness: Added tests for 'ipfs add -w' --- test/sharness/t0040-add-and-cat.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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