youporn.js: Remove unneeded title scraping
[conkeror.git] / test / batch-js.sh
blobc356878a364b3162c25adb278f09c13b568628ab
1 #! /bin/bash
3 if [[ ! -e build.sh || ! -e install.sh ]]; then
4 echo "This test suite must be run from Conkeror's src root."
5 exit 1
6 fi
8 . test/test.sh
9 setup
11 ## copy the javascript batch suite to the scratch directory.
12 cp test/batch-suite.js "$scratch/"
13 BATCHSUITEJS="$scratch/batch-suite.js"
15 enter_scratch_directory
17 ### Tests
18 ###
20 ## batch-suite.js
22 ## Now we run javascript suites by batch-loading a test script into
23 ## conkeror, and reading its output. This is fragile because there
24 ## has to be agreement between this script and the js script
25 ## concerning how test results are reported.
27 UNEXPECTEDOUT=0
28 while read LINE; do
29 echo "$LINE"
30 let "TESTSRUN = $TESTSRUN + 1"
31 case "$LINE" in
32 *\ ...\ fail)
33 let "TESTSFAILED = $TESTSFAILED + 1" ;;
34 *\ ...\ pass) ;;
35 *) let "UNEXPECTEDOUT = $UNEXPEXECTEDOUT + 1" ;;
36 esac
37 done < <(./bin/conkeror -q -batch -l "$BATCHSUITEJS" 2>&1)
40 ## gui-xephyr
42 # Xephyr :1 &
43 # export DISPLAY=:1
46 teardown