jdk/test/tools/launcher/Settings.java
changeset 11363 09b0c9731145
parent 7810 d4730191e53c
child 11687 f13cadbb0bb5
equal deleted inserted replaced
11362:02eae572563e 11363:09b0c9731145
     1 /*
     1 /*
     2  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    23 import java.io.File;
    23 import java.io.File;
    24 import java.io.IOException;
    24 import java.io.IOException;
    25 
    25 
    26 /*
    26 /*
    27  * @test
    27  * @test
    28  * @bug 6994753
    28  * @bug 6994753 7123582
    29  * @summary tests -XshowSettings options
    29  * @summary tests -XshowSettings options
    30  * @compile -XDignore.symbol.file Settings.java TestHelper.java
    30  * @compile -XDignore.symbol.file Settings.java TestHelper.java
    31  * @run main Settings
    31  * @run main Settings
    32  * @author ksrini
    32  * @author ksrini
    33  */
    33  */
   127         checkNoContains(tr, VM_SETTINGS);
   127         checkNoContains(tr, VM_SETTINGS);
   128         checkNoContains(tr, PROP_SETTINGS);
   128         checkNoContains(tr, PROP_SETTINGS);
   129         checkNoContains(tr, LOCALE_SETTINGS);
   129         checkNoContains(tr, LOCALE_SETTINGS);
   130         checkContains(tr, "Unrecognized option: -XshowSettingsBadOption");
   130         checkContains(tr, "Unrecognized option: -XshowSettingsBadOption");
   131     }
   131     }
       
   132 
       
   133     static void runTest7123582() throws IOException {
       
   134         TestHelper.TestResult tr = null;
       
   135         tr = TestHelper.doExec(TestHelper.javaCmd, "-XshowSettings", "-version");
       
   136         if (!tr.isOK()) {
       
   137             System.out.println(tr.status);
       
   138             throw new RuntimeException("test fails");
       
   139         }
       
   140         containsAllOptions(tr);
       
   141     }
       
   142 
   132     public static void main(String... args) {
   143     public static void main(String... args) {
   133         try {
   144         try {
   134             runTestOptionAll();
   145             runTestOptionAll();
   135             runTestOptionDefault();
   146             runTestOptionDefault();
   136             runTestOptionVM();
   147             runTestOptionVM();
   137             runTestOptionProperty();
   148             runTestOptionProperty();
   138             runTestOptionLocale();
   149             runTestOptionLocale();
   139             runTestBadOptions();
   150             runTestBadOptions();
       
   151             runTest7123582();
   140         } catch (IOException ioe) {
   152         } catch (IOException ioe) {
   141             throw new RuntimeException(ioe);
   153             throw new RuntimeException(ioe);
   142         }
   154         }
   143     }
   155     }
   144 }
   156 }