git @ Cat's Eye Technologies Lexeduct / 0.1-2017.0502
Don't try to run tests if node.js is not on the search path. Chris Pressey 4 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
00 #!/bin/sh
1
2 NODE="node"
3 if [ x`which $NODE` = x ]; then
4 echo "$NODE not found on search path. Tests not run."
5 exit 0
6 fi
17
28 assert() {
39 COMMAND=$1
1622 assert "echo 'Hello' | src/lexeduct.js chars=' ' insert-chars" "H e l l o "
1723 assert "echo 'Hello' | src/lexeduct.js chars='a' insert-chars upper" "HAEALALAOA"
1824 assert "echo 'Hello' | src/lexeduct.js upper chars='a' insert-chars" "HaEaLaLaOa"
25
26 echo "All tests passed."