369N/A * The contents of this file are subject to the terms of the 369N/A * Common Development and Distribution License (the "License"). 369N/A * You may not use this file except in compliance with the License. 369N/A * language governing permissions and limitations under the License. 369N/A * When distributing Covered Code, include this CDDL HEADER in each 369N/A * If applicable, add the following below this CDDL HEADER, with the 369N/A * fields enclosed by brackets "[]" replaced with your own identifying 369N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1069N/A * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 1069N/A * The value returned by {@link RuntimeEnvironment#isQuickContextScan()} 1069N/A * before the test is run. Will be used to restore the flag after each 1069N/A // Save initial value of the quick context scan flag. 1069N/A // Restore the initial value of the quick context scan flag. 1069N/A * Tests for the isEmpty() method. 1069N/A // Definition search should be used 1069N/A // Symbol search should be used 1069N/A // Full search should be used 1069N/A // History search should not be used 1069N/A // Path search should not be used 1069N/A // Combined search should be fine 1069N/A * Tests for the getContext() method. 1069N/A * Helper method for testing various paths through the getContext() method. 1069N/A * @param limit true if limited, quick context scan should be used 1069N/A * @param hitList true if output should be written to a list instead of 1071N/A // Search freetext for the term "def" 1470N/A :
"<a class=\"rsh\" href=\"#1\"><span class=\"l\">1</span> " 1470N/A +
"abc <b>def</b> ghi</a><br/>";
1470N/A :
"<a class=\"rsh\" href=\"#1\"><span class=\"l\">1</span> " 1470N/A +
"abc <b>def</b> ghi</a> <span class=\"rshd\"> type</span> <br/>";
1071N/A // Search with no input (will search definitions) 1470N/A :
"<a class=\"rsh\" href=\"#1\"><span class=\"l\">1</span> " 1470N/A +
"text</a> <span class=\"rshd\">type</span><br/>";
1071N/A // History search (should not show source context) 369N/A * Test that we don't get an {@code ArrayIndexOutOfBoundsException} when 369N/A * a long (>100 characters) line which contains a match is not 369N/A * terminated with a newline character before the buffer boundary. 389N/A * Test that we get the [all...] link if a very long line crosses the 389N/A * buffer boundary. Bug 383. 389N/A // Create input which consists of one single line longer than 389N/A // Context.MAXFILEREAD. 390N/A * Test that a line with more than 100 characters after the first match 390N/A * is truncated, and that … is appended to show that the line is 1001N/A * Test that valid HTML is generated for a match that spans multiple 1001N/A * lines. It used to nest the tags incorrectly. Bug #15632. 1001N/A // Search for a multi-token phrase that spans multiple lines in the 1001N/A // input file. The generated HTML fragment is inserted inside a root 1001N/A // element so that the StringWriter contains a valid XML document. 1001N/A // Close the XML document body 1001N/A // Check that valid XML was generated. This call used to fail with 1001N/A // SAXParseException: [Fatal Error] :3:55: The element type "b" must 1001N/A // be terminated by the matching end-tag "</b>". 1001N/A * Parse the XML document contained in a string. 1001N/A * @param document string with the contents of an XML document 1001N/A * @return a DOM representation of the document 1001N/A * @throws Exception if the document cannot be parsed 1082N/A * Verify that the matching lines are shown in their original form and 1082N/A * not lower-cased (bug #16848). 1138N/A * The results from mixed-case symbol search should contain tags. 1138N/A // Freetext search should match regardless of case 1138N/A // Defs search should only match if case matches 1138N/A // Refs search should only match if case matches 1138N/A // Path search shouldn't match anything in source 1138N/A // Refs should only match if case matches, but freetext will match 1138N/A // Refs should only match if case matches, hist shouldn't match 1138N/A * Helper method which does the work for {@link #bug17582()}. 1138N/A * @param builder builder for the query we want to test 1138N/A * @param lines the expected line numbers in the hit list 1138N/A * @param tags the expected tags in the hit list