test/script/nosecurity/os-not-windows.js

Wed, 05 Sep 2018 01:21:35 -0700

author
diazhou
date
Wed, 05 Sep 2018 01:21:35 -0700
changeset 2374
037913b52507
parent 1823
e6bd60e65f33
permissions
-rw-r--r--

Added tag jdk8u192-b09 for changeset 456c0d45c43b

mhaupt@1823 1 /*
mhaupt@1823 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
mhaupt@1823 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mhaupt@1823 4 *
mhaupt@1823 5 * This code is free software; you can redistribute it and/or modify it
mhaupt@1823 6 * under the terms of the GNU General Public License version 2 only, as
mhaupt@1823 7 * published by the Free Software Foundation.
mhaupt@1823 8 *
mhaupt@1823 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mhaupt@1823 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mhaupt@1823 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mhaupt@1823 12 * version 2 for more details (a copy is included in the LICENSE file that
mhaupt@1823 13 * accompanied this code).
mhaupt@1823 14 *
mhaupt@1823 15 * You should have received a copy of the GNU General Public License version
mhaupt@1823 16 * 2 along with this work; if not, write to the Free Software Foundation,
mhaupt@1823 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mhaupt@1823 18 *
mhaupt@1823 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mhaupt@1823 20 * or visit www.oracle.com if you need additional information or have any
mhaupt@1823 21 * questions.
mhaupt@1823 22 */
mhaupt@1823 23
mhaupt@1823 24 /**
mhaupt@1823 25 * Test that we're not running on Windows. The test actually checks if the os.not.windows property is set and processed
mhaupt@1823 26 * by runif correctly.
mhaupt@1823 27 *
mhaupt@1823 28 * @test
mhaupt@1823 29 * @runif os.not.windows
mhaupt@1823 30 * @run
mhaupt@1823 31 */
mhaupt@1823 32
mhaupt@1823 33 var os = java.lang.System.getProperty("os.name")
mhaupt@1823 34
mhaupt@1823 35 if (os.startsWith("Windows")) {
mhaupt@1823 36 throw "This test should not be run on Windows."
mhaupt@1823 37 }

mercurial