3 # Test various -remote use cases. Start an ELinks instance before
4 # running the test. All arguments to this test script will be passed to
5 # ELinks. Set ELINKS to change the binary to execute ELinks.
7 # XXX: The test will affect your current ELinks configurations. If you
8 # do not want this pass --config-dir <path/to/dir/> to avoid this.
10 # FIXME: Maybe make this script eun more automatic by using screen.
12 elinks
=${ELINKS:-elinks}
24 testno
=$
(expr "$testno" + 1)
25 echo "Test $testno: $desc"
26 echo " > $elinks $confdir --remote '$@'"
27 "$elinks" $args --remote "$@"
28 echo "Press return to continue..."
32 elinks
=${ELINKS:-elinks}
35 "$elinks" $args --remote "ping()" || die
"Start ELinks instance to proceed"
37 test_remote
"infoBox(): no quote" "infoBox(Hello World.)"
38 test_remote
"infoBox(): quote" 'infoBox("Hello World.")'
39 test_remote
"infoBox(): single quote (not considered as quote chars)" "infoBox('Hello World.')"
40 test_remote
"infoBox(): quoted quote" 'infoBox("Hello ""quoted"" World.")'
41 test_remote
"infoBox(): quoted string with comma" 'infoBox("Comma, a different kind of punctuation.")'
43 test_remote
"openURL(): prompt URL" "openURL()"
44 test_remote
"openURL(): in current tab" 'openURL("http://elinks.cz/")'
45 test_remote
"openURL(): in new tab" 'openURL(http://elinks.cz/news.html, new-tab)'
46 test_remote
"openURL(): in new tab" 'openURL("http://elinks.cz/news.html", "new-tab")'
47 test_remote
"openURL(): in new tab" 'openURL("http://elinks.cz/news.html", "new-tab")'
48 test_remote
"openURL(): in new window (requires that ELinks runs in screen or a window environment)" \
49 "openURL(http://elinks.cz/search.html, new-window)"
51 test_remote
"xfeDoCommand(): open new window (requires that ELinks runs in screen or a window environment)" \
52 "xfeDoCommand(openBrowser)"
54 test_remote
"addBookmark()" 'addBookmark("http://127.0.0.1/")'
56 test_remote
"ELinks extension: single URL" "/"