1132N/A * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 609N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 609N/A * This code is free software; you can redistribute it and/or modify it 609N/A * under the terms of the GNU General Public License version 2 only, as 609N/A * published by the Free Software Foundation. 609N/A * This code is distributed in the hope that it will be useful, but WITHOUT 609N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 609N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 609N/A * version 2 for more details (a copy is included in the LICENSE file that 609N/A * accompanied this code). 609N/A * You should have received a copy of the GNU General Public License version 609N/A * 2 along with this work; if not, write to the Free Software Foundation, 609N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 609N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 609N/A * or visit www.oracle.com if you need additional information or have any 609N/A * @summary provide examples of code that generate diagnostics 841N/A * @build ArgTypeCompilerFactory Example HTMLWriter RunExamples 1132N/A * See CR 7127924 for info on why othervm is used. 609N/A * Utility to run selected or all examples, writing results to 609N/A * stdout, a plain text file or an HTML file. This program can be 609N/A * run standalone, or as a jtreg test. 609N/A * -examples dir directory of examples. Defaults to ${test.src}/examples 609N/A * -raw run examples with -XDrawDiagnostics 609N/A * -showFiles include text of source files in the output 609N/A * -verbose verbose output 609N/A * -o file write output to file: format will be HTML if 609N/A * file has .html extension; otherwise it will be plain text. 609N/A * -title string specify a title, only applies to HTML output 609N/A // use standard jtreg scratch directory: the current directory 609N/A /* VERY IMPORTANT NOTE. In jtreg mode, tmpDir is set to the 609N/A * jtreg scratch directory, which is the current directory. 609N/A * In case someone is faking jtreg mode, make sure to only 609N/A * clean tmpDir when it is reasonable to do so. 841N/A // special mode to show message keys and the types of the args that 609N/A * Get the complete set of examples to be checked. 609N/A * Clean the contents of a directory. 609N/A // only show Output: header if also showing files 609N/A html.
writeLine(
"div.file { background-color:#e0ffe0; margin-left:30px; margin-right:30px;\n" 609N/A +
" padding: 3px; border: thin solid silver; }");
609N/A html.
writeLine(
"div.output { background-color:#e0e0ff; margin-left:30px; margin-right:30px;\n" 609N/A +
" padding: 3px; border: thin solid silver; }");
609N/A html.
writeLine(
"p.output { white-space: pre-wrap; font-family:monospace; margin: 0; }");
609N/A +
" var item = document.getElementById(id);\n" 609N/A +
" item.className=(item.className=='hidden')?'unhidden':'hidden';\n" 609N/A //html.writeEntity("©"); 609N/A // only show Output: header if also showing files