on master help sign in
Add NodeJS tests.
e049ef9Rob Blanckaert
Dockerfile+2−1
@@ -11,7 +11,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
11 tcl-dev \
11 tcl-dev \
12 libnspr4-dev \
12 libnspr4-dev \
13 libffi-dev \
13 libffi-dev \
14− expect
14+ expect \
15+ nodejs
15
16
16RUN wget \
17RUN wget \
17 http://launchpadlibrarian.net/309343864/libmozjs185-dev_1.8.5-1.0.0+dfsg-7_amd64.deb && \
18 http://launchpadlibrarian.net/309343864/libmozjs185-dev_1.8.5-1.0.0+dfsg-7_amd64.deb && \
run_tests+1−1
@@ -20,5 +20,5 @@ for t in ${tests}; do
20 fi
20 fi
21
21
22 echo -ne '\r'
22 echo -ne '\r'
23− echo " ✓ $name"
23+ echo -e " \e[32m✓\e[0m $name"
24done
24done
tests/nodejs/1_plus_1.expnew file+12
@@ -0,0 +1,12 @@
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 -- "1+1\r"
8+expect -exact "1+1\r\r
9+\[33m2\[39m\r
10+\[1G\[0J--> \[5G"
11+send -- ""
12+expect eof
tests/nodejs/set_ps1.expnew file+11
@@ -0,0 +1,11 @@
1+#!/usr/bin/expect -f
2+
3+set timeout -1
4+spawn ./prybar-nodejs -i -q -ps1 custom
5+match_max 100000
6+expect -exact "\[1G\[0Jcustom\[7G"
7+send -- "console.log('hit')"
8+expect -exact "console.log('hit')"
9+send -- "\r"
10+send -- ""
11+expect eof
tests/python3/show_header.exp+3−3
@@ -3,9 +3,9 @@
3set timeout -1
3set timeout -1
4spawn ./prybar-python3 -i
4spawn ./prybar-python3 -i
5match_max 100000
5match_max 100000
6−expect -exact "Python 3.6.6 (default, Sep 12 2018, 18:26:19) \r
6+expect -re {Python 3\.\d+\.\d+ ([^)]+)}
7−\[GCC 8.0.1 20180414 (experimental) \[trunk revision 259383\]\] on linux\r
7+expect -re {\[.+\] on [a-z0-9]+\r\n}
8−--> "
8+expect -exact "--> "
9send -- "1+1\r"
9send -- "1+1\r"
10expect -exact "1+1\r
10expect -exact "1+1\r
112\r
112\r