test/script/basic/scripting.js.EXPECTED

changeset 0
b1a7da25b547
child 952
6d5471a497fb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/script/basic/scripting.js.EXPECTED	Wed Apr 27 01:36:41 2016 +0800
     1.3 @@ -0,0 +1,103 @@
     1.4 +a normal string
     1.5 +line 0
     1.6 +line 1
     1.7 +Here is a long sentence
     1.8 +that may extend over 3
     1.9 +lines.!!!!
    1.10 +Here is a long sentence
    1.11 +that may extend over 4
    1.12 +lines.
    1.13 +!!!!
    1.14 +This is executed how
    1.15 +    <html>
    1.16 +        <head>
    1.17 +            <title>Testing</title>
    1.18 +        </head>
    1.19 +        <body>
    1.20 +            <p>This is a test.<p>
    1.21 +        </body>
    1.22 +    </html>
    1.23 +8
    1.24 +No we don't
    1.25 +/*
    1.26 + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
    1.27 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    1.28 + * 
    1.29 + * This code is free software; you can redistribute it and/or modify it
    1.30 + * under the terms of the GNU General Public License version 2 only, as
    1.31 + * published by the Free Software Foundation.
    1.32 + * 
    1.33 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.34 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.35 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.36 + * version 2 for more details (a copy is included in the LICENSE file that
    1.37 + * accompanied this code).
    1.38 + * 
    1.39 + * You should have received a copy of the GNU General Public License version
    1.40 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.41 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.42 + * 
    1.43 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.44 + * or visit www.oracle.com if you need additional information or have any
    1.45 + * questions.
    1.46 + */
    1.47 +
    1.48 +/**
    1.49 + * Edit strings test
    1.50 + *
    1.51 + * @test
    1.52 + * @option -scripting
    1.53 + * @run
    1.54 + */
    1.55 +
    1.56 +# scripting mode - shell style line comment works..
    1.57 +
    1.58 +var t = "normal";
    1.59 +print("a ${t} string");
    1.60 +
    1.61 +// JavaScript style line comment works too..
    1.62 +var i = 0;
    1.63 +print("line ${i++}\nline ${i++}");
    1.64 +
    1.65 +var c = 3;
    1.66 +print(<<EOD + "!!!!")
    1.67 +Here is a long sentence
    1.68 +that may extend over ${c}
    1.69 +lines.
    1.70 +EOD
    1.71 +
    1.72 +c = 4;
    1.73 +print(<<<EOD + "!!!!")
    1.74 +Here is a long sentence
    1.75 +that may extend over ${c}
    1.76 +lines.
    1.77 +EOD
    1.78 +
    1.79 +eval(<<BRAINTEASER);
    1.80 +print("This is executed how");
    1.81 +BRAINTEASER
    1.82 +
    1.83 +print(<<HTML);
    1.84 +    <html>
    1.85 +        <head>
    1.86 +            <title>Testing</title>
    1.87 +        </head>
    1.88 +        <body>
    1.89 +            <p>This is a test.<p>
    1.90 +        </body>
    1.91 +    </html>
    1.92 +HTML
    1.93 +
    1.94 +var x = 1
    1.95 +<<
    1.96 +3;
    1.97 +print(x);
    1.98 +
    1.99 +var y = <<EOD;
   1.100 +There we go
   1.101 +EOD y = "No we don't";
   1.102 +print(y);
   1.103 +
   1.104 +
   1.105 +print(readFully(__FILE__));
   1.106 +

mercurial