forked from williamkapke/node-compat-table
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrhinotest.sh
executable file
·36 lines (27 loc) · 1.33 KB
/
rhinotest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# This runs the test for only a single version. See "rhinoall.sh" to run them all
# To update this compatibility table for a new build of Rhino:
# 1) Build the JAR that you want to test
# 2) Set "rhinoJar" below to point to it
# 3) Set "rhinoVersion" below to the version number
# 4) Edit "rhinoversions.js" to add your new version to the list
# 5) Run this script!
rhinoJar=~/src/rhino/rhino-all/build/libs/rhino-all-1.8.0.jar
rhinoVersion=1.8.0
supportVersion=20
curl https://raw.githubusercontent.com/kangax/compat-table/gh-pages/data-es6.js > data-es6.js
curl https://raw.githubusercontent.com/kangax/compat-table/gh-pages/data-es2016plus.js > data-es2016plus.js
curl https://raw.githubusercontent.com/kangax/compat-table/gh-pages/data-esnext.js > data-esnext.js
echo
echo 'extracting testers...'
node extract.js ./data-es6.js > ./testers-es6.json
node extract.js ./data-es2016plus.js > ./testers-es2016plus.json
node extract.js ./data-esnext.js > ./testers-esnext.json
node testers.js > testers.json
echo "supportVersion=${supportVersion}; load('rhinotest.js');" > tmptest.$$
echo 'Running test...'
java -jar ${rhinoJar} -debug tmptest.$$ > rhino-results/${rhinoVersion}.json
java -jar ${rhinoJar} -version 200 -debug tmptest.$$ > rhino-results/${rhinoVersion}-es6.json
rm -f tmptest.$$
echo 'Building...'
node buildrhino.js