File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- # set -e
3-
4- EXPECTED=' (x): number => 123\n'
5- ACTUAL=$( echo ' ( \n x ) : number => 123 ' | /usr/bin/env node index.js -assume-filename a.js)
6- if [[ " $ACTUAL " = " $EXPECTED " ]]; then
7- echo " [FAIL] Expected $EXPECTED , got $ACTUAL " >&2
8- exit 1
9- fi
2+ set -e
103
114# Make sure we can run on relative an absolute paths (set -e checks for errors).
125/usr/bin/env node index.js index.js > /dev/null
@@ -21,7 +14,7 @@ EXPECTED_GLOB_STRING="ran google-java-format on 2 files" # somewhere in there
2114
2215(
2316 cd " $PWD " /testproject
24- yarn > /dev/null # Should give us a local clang -format, version doesn't really matter.
17+ yarn > /dev/null # Should give us a local google-java -format, version doesn't really matter.
2518 VERSION=$( /usr/bin/env node " $FULL_SCRIPT_PATH " -version)
2619 if [[ $VERSION != * " $EXPECTED_VERSION_STRING " * ]]; then
2720 echo " [FAIL] Expected string containing $EXPECTED_VERSION_STRING , got $VERSION " >&2
4942echo " [PASS] glob argument resolution" >&2
5043
5144echo " (The next output lines will be an expected error, as we test error codes)"
45+ set +e
5246eval " /usr/bin/env node $FULL_SCRIPT_PATH --set-exit-if-changed -n --glob=testproject/**/*.java"
5347if [ " $? " != 1 ]; then
5448 echo " [FAIL] Expected return status to be 1, got $? " >&2
You can’t perform that action at this time.
0 commit comments