87N/A/*
553N/A * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
87N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
87N/A *
87N/A * This code is free software; you can redistribute it and/or modify it
87N/A * under the terms of the GNU General Public License version 2 only, as
553N/A * published by the Free Software Foundation. Oracle designates this
87N/A * particular file as subject to the "Classpath" exception as provided
553N/A * by Oracle in the LICENSE file that accompanied this code.
87N/A *
87N/A * This code is distributed in the hope that it will be useful, but WITHOUT
87N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
87N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
87N/A * version 2 for more details (a copy is included in the LICENSE file that
87N/A * accompanied this code).
87N/A *
87N/A * You should have received a copy of the GNU General Public License version
87N/A * 2 along with this work; if not, write to the Free Software Foundation,
241N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
87N/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.
87N/A */
87N/A
87N/A/*
87N/A * @test
87N/A * @bug 4884240
87N/A * @summary additional option required for javap
87N/A */
87N/A
87N/Aimport java.io.*;
87N/A
87N/Apublic class T4884240 {
87N/A public static void main(String... args) throws Exception {
87N/A new T4884240().run();
87N/A }
87N/A
87N/A public void run() throws Exception {
87N/A StringWriter sw = new StringWriter();
87N/A PrintWriter pw = new PrintWriter(sw);
87N/A String[] args = { "-sysinfo", "java.lang.Object" };
87N/A int rc = com.sun.tools.javap.Main.run(args, pw);
87N/A if (rc != 0)
87N/A throw new Exception("unexpected return code: " + rc);
87N/A pw.close();
87N/A String[] lines = sw.toString().split("\n");
87N/A if (lines.length < 3
348N/A || !lines[0].trim().startsWith("Classfile")
348N/A || !lines[1].trim().startsWith("Last modified")
348N/A || !lines[2].trim().startsWith("MD5")) {
87N/A System.out.println(sw);
87N/A throw new Exception("unexpected output");
87N/A }
87N/A }
87N/A}