T6715753.java revision 797
65N/A/*
797N/A * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
65N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
65N/A *
65N/A * This code is free software; you can redistribute it and/or modify it
65N/A * under the terms of the GNU General Public License version 2 only, as
65N/A * published by the Free Software Foundation.
65N/A *
65N/A * This code is distributed in the hope that it will be useful, but WITHOUT
65N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
65N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
65N/A * version 2 for more details (a copy is included in the LICENSE file that
65N/A * accompanied this code).
65N/A *
65N/A * You should have received a copy of the GNU General Public License version
65N/A * 2 along with this work; if not, write to the Free Software Foundation,
65N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
65N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
65N/A */
65N/A
65N/Aimport java.io.*;
65N/A
65N/A/*
65N/A * @test
65N/A * @bug 6715753
65N/A * @summary Use javap to inquire about a specific inner class
65N/A */
65N/A
65N/Apublic class T6715753 {
65N/A public static void main(String... args) throws Exception {
65N/A new T6715753().run();
65N/A }
65N/A
65N/A void run() throws Exception {
65N/A StringWriter sw = new StringWriter();
65N/A PrintWriter pw = new PrintWriter(sw);
65N/A String[] args = { "-notAnOption" };
65N/A int rc = com.sun.tools.javap.Main.run(args, pw);
65N/A String log = sw.toString();
65N/A if (rc == 0
65N/A || log.indexOf("-notAnOption") == -1
65N/A || log.indexOf("javap") == -1) { // locale-independent indication of usage message
65N/A System.err.println("rc: " + rc + ", log=\n" + log);
65N/A throw new Exception("test failed");
65N/A }
65N/A }
524N/A}