test/script/nosecurity/JDK-8073613.js

Fri, 06 Sep 2019 03:21:30 +0100

author
andrew
date
Fri, 06 Sep 2019 03:21:30 +0100
changeset 2516
ad8af81cc28b
parent 1519
8c0d18eec5f1
permissions
-rw-r--r--

Added tag jdk8u242-b00 for changeset 8a951fd037e2

mhaupt@1518 1 /*
mhaupt@1518 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
mhaupt@1518 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mhaupt@1518 4 *
mhaupt@1518 5 * This code is free software; you can redistribute it and/or modify it
mhaupt@1518 6 * under the terms of the GNU General Public License version 2 only, as
mhaupt@1518 7 * published by the Free Software Foundation.
mhaupt@1518 8 *
mhaupt@1518 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mhaupt@1518 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mhaupt@1518 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mhaupt@1518 12 * version 2 for more details (a copy is included in the LICENSE file that
mhaupt@1518 13 * accompanied this code).
mhaupt@1518 14 *
mhaupt@1518 15 * You should have received a copy of the GNU General Public License version
mhaupt@1518 16 * 2 along with this work; if not, write to the Free Software Foundation,
mhaupt@1518 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mhaupt@1518 18 *
mhaupt@1518 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mhaupt@1518 20 * or visit www.oracle.com if you need additional information or have any
mhaupt@1518 21 * questions.
mhaupt@1518 22 */
mhaupt@1518 23
mhaupt@1518 24 /**
mhaupt@1518 25 * JDK-8073613: Here documents: how to avoid string interpolation?
mhaupt@1518 26 *
mhaupt@1518 27 * @test
mhaupt@1518 28 * @option -scripting
mhaupt@1518 29 * @run
mhaupt@1518 30 */
mhaupt@1518 31
mhaupt@1518 32 var a = 2,
mhaupt@1518 33 b = 3
mhaupt@1518 34
mhaupt@1518 35 print(<<EOD)
mhaupt@1518 36 ${a}${b}
mhaupt@1518 37 EOD
mhaupt@1518 38
mhaupt@1518 39 print(<<"EOD")
mhaupt@1518 40 ${a}${b}
mhaupt@1518 41 EOD
mhaupt@1518 42
mhaupt@1518 43 print(<<'EOM')
mhaupt@1518 44 ${a}${b}
mhaupt@1518 45 EOM
mhaupt@1518 46
mhaupt@1518 47 print(<<"EOM")
mhaupt@1518 48 $\{a}
mhaupt@1518 49 EOM
mhaupt@1518 50

mercurial