summaryrefslogtreecommitdiff
path: root/tests/webkittest.sh
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2010-11-15 00:24:46 +0000
committerNick White <git@njw.me.uk>2010-11-15 00:24:46 +0000
commitcba8e7d8f263c6b5ac456a5f2a626e2e1b06fc63 (patch)
tree85641aecb434dca168d2719add4e1d7dfaedb4b2 /tests/webkittest.sh
parent68eb363dc0c535a309f2ae533cedf27b92f6cd8e (diff)
Use more reliable test js bug workaround
Diffstat (limited to 'tests/webkittest.sh')
-rwxr-xr-xtests/webkittest.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/webkittest.sh b/tests/webkittest.sh
index 412474b..71b87f1 100755
--- a/tests/webkittest.sh
+++ b/tests/webkittest.sh
@@ -8,6 +8,13 @@ test $# -ne 2 && echo usage $0 testhtml expectedoutput && exit 1
testjs=tests/showsimple.js
htmlloadtime=2
scriptloadtime=3
+scriptjs=$HOME/.surf/script.js
+
+touch $scriptjs
+test $scriptjs && mv $scriptjs $scriptjs.real
+cp simplyread.js $scriptjs
+
+trap 'rm -f testxid testoutput testoutputbody $scriptjs;mv $scriptjs.real $scriptjs' EXIT
surf -x "file://./$1" > testxid 2>testoutput &
pid=$!
@@ -22,5 +29,4 @@ sed 's/^\*\* Message:[^<]*//g' < testoutput > testoutputbody
diff "$2" testoutputbody
result=$?
-rm -f testxid testoutput testoutputbody
exit $result