Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 40 lines (36 sloc) 0.879 kb
#!/bin/zsh -f
if [[ $1 == "" ]]; then
echo "Usage: $0 <testname>"
exit 1
fi
if [[ -x $(which js) ]]; then
function run() {
$(which js) $1
}
elif [[ -x $(which cscript) ]]; then
function run() {
$(which cscript) //NoLogo //U $1 | iconv -f UTF-16LE -t UTF-8 | sed -re 's|\x0A\n|\n|'
}
else
echo "Could not find a javascript interpreter"
exit 1
fi
while true; do
touch $1
./pyjs.py -b generate -o .
python $1 > 1.res
./pyjs.py -q --builtins=import -o 1.js $1
if run 1.js > 1.out; then
if diff -au 1.res 1.out; then
echo "Files now match!"
exit
fi
else
echo "Could not run $1:"
cat 1.out
fi
read "dummy?Press enter to continue>"
echo
echo "################################################################################"
echo
done
Jump to Line
Something went wrong with that request. Please try again.