diff --git a/test/sharness/t0041-add-cat-offline.sh b/test/sharness/t0041-add-cat-offline.sh index cb370eec009..674e65284c9 100755 --- a/test/sharness/t0041-add-cat-offline.sh +++ b/test/sharness/t0041-add-cat-offline.sh @@ -31,4 +31,19 @@ test_expect_success "output looks good" ' test_cmp afile out_2 ' +test_expect_success "useful error message when adding a named pipe" ' + mkfifo named-pipe + test_expect_code 1 ipfs add named-pipe 2>named-pipe-error + echo "Error: \`named-pipe\` is an unknown type" >named-pipe-error-expected + test_cmp named-pipe-error-expected named-pipe-error +' + +test_expect_success "useful error message when recursively adding a named pipe" ' + mkdir named-pipe-dir + mkfifo named-pipe-dir/named-pipe + test_expect_code 1 ipfs add -r named-pipe-dir 2>named-pipe-dir-error + echo "Error: \`named-pipe-dir/named-pipe\` is an unknown type" >named-pipe-dir-error-expected + test_cmp named-pipe-dir-error-expected named-pipe-dir-error +' + test_done