Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | ./hello &> $test.output 2>&1 |
| 4 | out="Hello world!" |
| 5 | |
| 6 | if grep -i "$out" $test.output 2>&1 ; then |
| 7 | echo "PASS: Hello duktape" |
| 8 | else |
| 9 | echo "FAIL: Hello duktape" |
| 10 | fi |
| 11 | rm -f $test.output |
| 12 | |
| 13 | ./eval "print('Hello world!'); 123;" > out.log |
| 14 | |
| 15 | sed -n '2p' out.log > eval.log |
| 16 | sed -n '3p' out.log >> eval.log |
| 17 | |
| 18 | if grep -w 'Hello world!\|123' eval.log 2>&1; then |
| 19 | echo "PASS: eval duktape" |
| 20 | else |
| 21 | echo "FAIL: eval duktape" |
| 22 | fi |
| 23 | rm -f eval.log out.log |
| 24 | |
| 25 | ./evloop timer-test.js > evloop.log 2>&1 |
| 26 | |
| 27 | if grep -i "no active timers and no sockets to poll" evloop.log 2>&1; then |
| 28 | echo "PASS: evloop duktape" |
| 29 | else |
| 30 | echo "FAIL: evloop duktape" |
| 31 | fi |
| 32 | rm -f evloop.log |