load-spec.js: add support for raw_post_data property, in order to support XMLHttpRequest
[conkeror.git] / test / cmdline.sh
blobf31227019789d9fbd332fe971dffb311f6a7d840
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 ## produce a javascript file that just dumpln's "Hello, World!"
12 TESTSCRIPT1="$scratch/test1.js"
13 TESTSCRIPT1OUT="Hello, World"\!
14 echo -e "\nconkeror.dumpln (\"$TESTSCRIPT1OUT\");\n" > "$TESTSCRIPT1"
16 enter_scratch_directory
18 ### Tests
19 ###
21 assert-z \
22 "cmdline" \
23 "\`conkeror -q -batch' produces no output" \
24 "./bin/conkeror -q -batch 2>&1"
26 assert-equal \
27 "cmdline" \
28 "dumpln a pref, and browser.chromeURL is as expected" \
29 "chrome://conkeror/content/conkeror.xul" \
30 "./bin/conkeror -q -batch \
31 -e 'conkeror.dumpln(\
32 conkeror.preferences.getCharPref(\
33 \"browser.chromeURL\"))'\
34 2>&1"
36 assert-equal \
37 "cmdline" \
38 "load js file with \`conkeror -l'" \
39 "$TESTSCRIPT1OUT" \
40 "./bin/conkeror -q -batch -l \"$TESTSCRIPT1\" 2>&1"
43 teardown