equal
deleted
inserted
replaced
1 #!/bin/sh |
1 #!/bin/sh |
2 |
2 |
3 # |
3 # |
4 # Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. |
4 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 # |
6 # |
7 # This code is free software; you can redistribute it and/or modify it |
7 # This code is free software; you can redistribute it and/or modify it |
8 # under the terms of the GNU General Public License version 2 only, as |
8 # under the terms of the GNU General Public License version 2 only, as |
9 # published by the Free Software Foundation. |
9 # published by the Free Software Foundation. |
40 fi |
40 fi |
41 |
41 |
42 rm -f jrunscript-fTest.out 2>/dev/null |
42 rm -f jrunscript-fTest.out 2>/dev/null |
43 ${JRUNSCRIPT} -f ${TESTSRC}/hello.js > jrunscript-fTest.out 2>&1 |
43 ${JRUNSCRIPT} -f ${TESTSRC}/hello.js > jrunscript-fTest.out 2>&1 |
44 |
44 |
45 diff jrunscript-fTest.out ${TESTSRC}/dash-f.out |
45 $golden_diff jrunscript-fTest.out ${TESTSRC}/dash-f.out |
46 if [ $? != 0 ] |
46 if [ $? != 0 ] |
47 then |
47 then |
48 echo "Output of jrunscript -f differ from expected output. Failed." |
48 echo "Output of jrunscript -f differ from expected output. Failed." |
49 rm -f jrunscript-fTest.out 2>/dev/null |
49 rm -f jrunscript-fTest.out 2>/dev/null |
50 exit 1 |
50 exit 1 |
54 # with -l option |
54 # with -l option |
55 |
55 |
56 rm -f jrunscript-fTest.out 2>/dev/null |
56 rm -f jrunscript-fTest.out 2>/dev/null |
57 ${JRUNSCRIPT} -l js -f ${TESTSRC}/hello.js > jrunscript-fTest.out 2>&1 |
57 ${JRUNSCRIPT} -l js -f ${TESTSRC}/hello.js > jrunscript-fTest.out 2>&1 |
58 |
58 |
59 diff jrunscript-fTest.out ${TESTSRC}/dash-f.out |
59 $golden_diff jrunscript-fTest.out ${TESTSRC}/dash-f.out |
60 if [ $? != 0 ] |
60 if [ $? != 0 ] |
61 then |
61 then |
62 echo "Output of jrunscript -f differ from expected output. Failed." |
62 echo "Output of jrunscript -f differ from expected output. Failed." |
63 rm -f jrunscript-fTest.out 2>/dev/null |
63 rm -f jrunscript-fTest.out 2>/dev/null |
64 exit 1 |
64 exit 1 |