Skip to content

Commit ef3167d

Browse files
committed
test: errors must not exit the script if we want to test errors
1 parent 786630a commit ef3167d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
# set -e
33

44
EXPECTED='(x): number => 123\n'
55
ACTUAL=$(echo '( \n x ) : number => 123 ' | /usr/bin/env node index.js -assume-filename a.js)
@@ -48,6 +48,7 @@ if [[ "$GLOB" != *"$EXPECTED_FAIL_FILE"* ]]; then
4848
fi
4949
echo "[PASS] glob argument resolution" >&2
5050

51+
echo "(The next output lines will be an expected error, as we test error codes)"
5152
eval "/usr/bin/env node $FULL_SCRIPT_PATH --set-exit-if-changed -n --glob=testproject/**/*.java"
5253
if [ "$?" != 1 ]; then
5354
echo "[FAIL] Expected return status to be 1, got $?" >&2

0 commit comments

Comments
 (0)