on master help sign in
add and update tests
296f026Amjad Masad
tests/nodejs/err.expnew file+21
@@ -0,0 +1,21 @@
1+#!/usr/bin/expect -f
2+
3+set timeout -1
4+spawn ./prybar-nodejs -i -q
5+match_max 100000
6+expect -exact "\[1G\[0J--> \[5G"
7+send -- "x\r"
8+expect -exact "x\r\r
9+\u001b\[0m\u001b\[31mReferenceError: x is not defined\r
10+ at repl:1:1\r
11+ at Script.runInContext (vm.js:130:18)\r
12+ at REPLServer.defaultEval (repl.js:435:29)\r
13+ at bound (domain.js:427:14)\r
14+ at REPLServer.runBound \[as eval\] (domain.js:440:12)\r
15+ at REPLServer.onLine (repl.js:760:10)\r
16+ at REPLServer.emit (events.js:315:20)\r
17+ at REPLServer.EventEmitter.emit (domain.js:483:12)\r
18+ at REPLServer.Interface._onLine (readline.js:329:10)\r
19+ at REPLServer.Interface._line (readline.js:658:8)\u001b\[0m\u001b\[1G\u001b\[0J--> \u001b\[5G"
20+send -- ""
21+expect eof
tests/nodejs/eval_code.exp+2−2
@@ -1,8 +1,8 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/expect -d
2
2
3set timeout -1
3set timeout -1
4spawn ./prybar-nodejs -q -e 1+1
4spawn ./prybar-nodejs -q -e 1+1
5match_max 100000
5match_max 100000
6−expect -exact "2\r
6+expect -exact "\u001b\[33m2\u001b\[39m\r
7"
7"
8expect eof
8expect eof
tests/nodejs/run_code.expnew file+6
@@ -0,0 +1,6 @@
1+#!/usr/bin/expect -f
2+
3+set timeout -1
4+spawn ./prybar-nodejs -q -c 1+1
5+match_max 100000
6+expect eof