on master help sign in
Fix node tests
303bb66masad-frost
run_tests+1−1
@@ -1,7 +1,7 @@
1#!/usr/bin/env bash
1#!/usr/bin/env bash
2
2
3stty cols 80
3stty cols 80
4−stty row 20
4+stty rows 20
5
5
6tests=$(find ./tests -printf '%P\n')
6tests=$(find ./tests -printf '%P\n')
7
7
tests/nodejs/err.exp+7−7
@@ -6,16 +6,16 @@ match_max 100000
6expect -exact "\[1G\[0J--> \[5G"
6expect -exact "\[1G\[0J--> \[5G"
7send -- "x\r"
7send -- "x\r"
8expect -exact "x\r\r
8expect -exact "x\r\r
9−\u001b\[0m\u001b\[31mReferenceError: x is not defined\r
9+\[0m\[31mReferenceError: x is not defined\r
10− at repl:1:1\r
10+ at REPL1:1:1\r
11− at Script.runInContext (vm.js:130:18)\r
11+ at Script.runInThisContext (vm.js:120:18)\r
12− at REPLServer.defaultEval (repl.js:435:29)\r
12+ at REPLServer.defaultEval (repl.js:442:29)\r
13 at bound (domain.js:427:14)\r
13 at bound (domain.js:427:14)\r
14 at REPLServer.runBound \[as eval\] (domain.js:440:12)\r
14 at REPLServer.runBound \[as eval\] (domain.js:440:12)\r
15− at REPLServer.onLine (repl.js:760:10)\r
15+ at REPLServer.onLine (repl.js:777:10)\r
16− at REPLServer.emit (events.js:315:20)\r
16+ at REPLServer.emit (events.js:314:20)\r
17 at REPLServer.EventEmitter.emit (domain.js:483:12)\r
17 at REPLServer.EventEmitter.emit (domain.js:483:12)\r
18 at REPLServer.Interface._onLine (readline.js:329:10)\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"
19+ at REPLServer.Interface._line (readline.js:658:8)\[0m\[1G\[0J--> \[5G"
20send -- ""
20send -- ""
21expect eof
21expect eof
tests/nodejs/global_bug.exp+5−5
@@ -1,10 +1,10 @@
1#!/usr/bin/expect -f
1#!/usr/bin/expect -f
2
2
3set timeout -1
3set timeout -1
4−spawn ./prybar-nodejs ./test_files/global_bug.js
4+spawn ./prybar-nodejs -i ./test_files/global_bug.js
5match_max 100000
5match_max 100000
6−expect -exact "Node v12.18.3 on linux\r
6+expect -re {Node v\d+\.\d+.\d+ on linux}
7−\u001b\[0m\u001b\[90mHint: hit control+c anytime to enter REPL.\[0m\r
7+expect -exact "\[0m\[90mHint: hit control+c anytime to enter REPL.\[0m\r
8−\u001b\[33mtrue\u001b\[39m\r
8+\[1G\[0J--> \[5G"
9−"
9+send -- ""
10expect eof
10expect eof
tests/nodejs/run_file.exp+12−9
@@ -1,16 +1,19 @@
1−#!/usr/bin/expect -d
1+#!/usr/bin/expect -f
2
2
3set timeout -1
3set timeout -1
4spawn ./prybar-nodejs -i ./test_files/hello.js
4spawn ./prybar-nodejs -i ./test_files/hello.js
5match_max 100000
5match_max 100000
6−expect -exact "Node v12.18.3 on linux\r
6+expect -re {Node v\d+\.\d+.\d+ on linux}
7−\u001b\[0m\u001b\[90mHint: hit control+c anytime to enter REPL.\[0m\r
7+expect -exact "\[0m\[90mHint: hit control+c anytime to enter REPL.\[0m\r
8hello\r
8hello\r
9−\u001b\[32m'hello'\u001b\[39m\r
9+\[32m'hello'\[39m\r
10−\u001b\[1G\u001b\[0J--> \u001b\[5G"
10+\[1G\[0J--> \[5G"
11−send -- "a\r"
11+send -- "a"
12+expect -exact "\r
13+\[90m'hello'\[39m\[6G\[1A"
14+send -- "\r"
12−expect -exact "a\r\r
15+expect -exact "\[1B\[2K\[1A\r\r
13−\u001b\[32m'hello'\u001b\[39m\r
16+\[32m'hello'\[39m\r
14−\u001b\[1G\u001b\[0J--> \u001b\[5G"
17+\[1G\[0J--> \[5G"
15send -- ""
18send -- ""
16expect eof
19expect eof