JFlexXrefTest.java revision 1050
1020N/A * The contents of this file are subject to the terms of the 1020N/A * Common Development and Distribution License (the "License"). 1020N/A * You may not use this file except in compliance with the License. 1020N/A * language governing permissions and limitations under the License. 1020N/A * When distributing Covered Code, include this CDDL HEADER in each 1020N/A * If applicable, add the following below this CDDL HEADER, with the 1020N/A * fields enclosed by brackets "[]" replaced with your own identifying 1020N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1050N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 1020N/A * Unit tests for JFlexXref. 1020N/A * Regression test case for bug #15890. Check that we get the expected the 1020N/A * expected line count from input with some special characters that used 1020N/A "line 4 with \u000B char\n" +
1020N/A "line 5 with \u000C char\n" +
1020N/A "line 6 with \u0085 char\n" +
1020N/A "line 7 with \u2028 char\n" +
1020N/A "line 8 with \u2029 char\n" +
1020N/A * Helper method that checks the line count for 1020N/A * {@link #testBug15890LineCount()}. 1020N/A * @param xref an instance of the xref class to test 1020N/A * Regression test case for bug #15890. Check that an anchor is correctly 1020N/A * inserted for definitions that appear after some special characters that 1020N/A * Helper method for {@link #testBug15890Anchor()}. 1020N/A * @param klass the Xref sub-class to test 1020N/A * @param path path to input file with a definition 1020N/A // Input files contain non-ascii characters and are encoded in UTF-8 1050N/A * Regression test case for bug #14663, which used to break syntax 1050N/A // \" should not start a new string literal 1050N/A // \" should not terminate a string literal 1050N/A "<b>echo</b> <span class=\"s\">\"\\\"\"</span>");
1050N/A // \` should not start a command substitution 1050N/A // \` should not start command substitution inside a string 1050N/A "<b>echo</b> <span class=\"s\">\"\\`\"</span>");
1050N/A // \` should not terminate command substitution 1050N/A "<b>echo</b> <span>`\\``</span>");
1050N/A // $# should not start a comment 1050N/A * Helper method that checks that the expected output is produced for a 1050N/A * line with the specified xref class. Fails if the output is not as 1050N/A * @param xrefClass xref class to test 1050N/A * @param inputLine the source code line to parse 1050N/A * @param expectedOutput the expected output from the xreffer 1050N/A // This prefix is always prepended to the first line: 1050N/A +
" 1 </a>";