nashorn/test/script/basic/JDK-8073653.js
author hannesw
Fri, 03 Feb 2017 13:28:00 +0100
changeset 43555 1bb10bccf057
parent 39168 e02c166da4dd
permissions -rw-r--r--
8173888: Test for JDK-8169481 causes stack overflows in parser tests Reviewed-by: jlaskey, sundar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39168
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     1
/*
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     4
 *
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     7
 * published by the Free Software Foundation.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     8
 *
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    13
 * accompanied this code).
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    14
 *
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    18
 *
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    21
 * questions.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    22
 */
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    23
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    24
/**
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    25
 * JDK-8073653: Secondary heredoc eating wrong lines.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    26
 *
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    27
 * @test
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    28
 * @run
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    29
 * @option -scripting
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    30
 */
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    31
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    32
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    33
print(<<EOD1); print(<<EOD2.toUpperCase());  var a = <<EOD3, b = <<EOD4.toLowerCase(), c = [<<EOD5, <<EOD6];
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    34
This is line 1.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    35
This is line 2.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    36
EOD1
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    37
This is line 3.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    38
This is line 4.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    39
EOD2
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    40
This is line 5.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    41
This is line 6.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    42
EOD3
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    43
This is line 7.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    44
This is line 8.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    45
EOD4
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    46
This is line 9.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    47
This is line 10.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    48
EOD5
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    49
This is line 11.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    50
This is line 12.
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    51
EOD6
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    52
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    53
print(a);
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    54
print(b);
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    55
for (var i in c) {
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    56
    print(c[i]);
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    57
}
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    58
e02c166da4dd 8073653: Secondary heredoc eating wrong lines.
hannesw
parents:
diff changeset
    59