on master help sign in
add and update tests
commit296f026f10e4f098a4ec5f8dd484a8c739c86e09 authorAmjad Masad <amjad.masad@gmail.com> dateSat 29 Aug 2020, 20:39 (6 years ago) parent60911ce
3 files changed+29−2
tests/nodejs/err.exp+21 tests/nodejs/eval_code.exp+2−2 tests/nodejs/run_code.exp+6
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
22
33set timeout -1
44spawn ./prybar-nodejs -q -e 1+1
55match_max 100000
6−expect -exact "2\r
6+expect -exact "\u001b\[33m2\u001b\[39m\r
77"
88expect 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