diff --git a/test/sharness/t0041-add-cat-offline.sh b/test/sharness/t0041-add-cat-offline.sh index a8c0e36a6afaf821772da881acd5b03743a8b174..68f6322676f007dc33db1765610b837fe68f7072 100755 --- a/test/sharness/t0041-add-cat-offline.sh +++ b/test/sharness/t0041-add-cat-offline.sh @@ -45,4 +45,12 @@ test_expect_success "output looks good" ' test_cmp afile out_2 ' +test_expect_success "ipfs add --only-hash succeeds" ' + echo "unknown content for only-hash" | ipfs add --only-hash -q > oh_hash +' + +test_expect_success "ipfs cat file fails" ' + test_must_fail ipfs cat $(cat oh_hash) +' + test_done