Skip to content

Commit 4a37fec

Browse files
committed
Add test for 'no such file' in cli
1 parent 9e4ca8e commit 4a37fec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/cli.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ node ${base}/../bin/cli.js ${base}/cli/markup.html | diff -q ${base}/cli/expecte
55
node ${base}/../bin/cli.js ${base}/cli/markup.html -o ${base}/cli/tmp.json
66
diff -q ${base}/cli/expected.json ${base}/cli/tmp.json
77
rm ${base}/cli/tmp.json
8+
set +e
9+
error=$(node ${base}/../bin/cli.js nope 2>&1)
10+
test $? -eq 1
11+
[ "$error" = "No such file: nope" ] || (echo "'No such file' logic is broken!"; exit 1)

0 commit comments

Comments
 (0)