jjs-option-ot.js revision 1648:25b13597ea73
1169689Skan/*
2169689Skan * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
3169689Skan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4169689Skan *
5169689Skan * This code is free software; you can redistribute it and/or modify it
6169689Skan * under the terms of the GNU General Public License version 2 only, as
7169689Skan * published by the Free Software Foundation.
8169689Skan *
9169689Skan * This code is distributed in the hope that it will be useful, but WITHOUT
10169689Skan * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11169689Skan * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12169689Skan * version 2 for more details (a copy is included in the LICENSE file that
13169689Skan * accompanied this code).
14169689Skan *
15169689Skan * You should have received a copy of the GNU General Public License version
16169689Skan * 2 along with this work; if not, write to the Free Software Foundation,
17169689Skan * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18169689Skan *
19169689Skan * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20169689Skan * or visit www.oracle.com if you need additional information or have any
21169689Skan * questions.
22169689Skan */
23169689Skan
24169689Skan/**
25169689Skan * JDK-8144113: Nashorn: enable jjs testing.
26169689Skan * @test
27169689Skan * @option -scripting
28169689Skan * @run
29169689Skan * @summary Test -ot flag
30169689Skan */
31169689Skan
32169689Skanload(__DIR__ + "jjs-common.js")
33169689Skan
34169689Skanvar args_n = "-scripting -ot=false"
35169689Skanvar msg_flag = "print($OPTIONS._optimistic_types)"
36169689Skan
37169689Skan// flag test expected output variables
38169689Skanvar e_outp = "true"
39169689Skanvar e_outn = "false"
40169689Skan
41169689Skan// Testing starts here
42169689Skantestjjs_flag("-ot","")
43169689Skan