IndexerTest.java revision 1092
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/**
*
* @author Trond Norbye
*/
public class IndexerTest {
public IndexerTest() {
}
public static void setUpClass() throws Exception {
assertTrue("No point in running indexer tests without valid ctags",
}
public static void tearDownClass() throws Exception {
}
public void setUp() throws IOException {
repository = new TestRepository();
}
public void tearDown() {
}
/**
* Test of doIndexerExecution method, of class Indexer.
*/
@Test
public void testIndexGeneration() throws Exception {
if (env.validateExuberantCtags()) {
env.setVerbose(true);
} else {
}
}
/**
* Test that rescanning for projects does not erase customization of
* existing projects. Bug #16006.
*/
@Test
public void testRescanProjects() throws Exception {
// Generate one project that will be found in source.zip, and set
// some properties that we can verify after the rescan.
// Generate one project that will not be found in source.zip, and that
// should not be in the list of projects after the rescan.
// Make the runtime environment aware of these two projects.
// Do a rescan of the projects, and only that (we don't care about
// the other aspects of indexing in this test case).
env,
false, // don't search for repositories
true, // scan and add projects
null, // no default project
null, // don't write config file
false, // don't refresh history
false, // don't list files
false, // don't create dictionary
null, // subFiles - not needed since we don't list files
null); // repositories - not needed when not refreshing history
// p2 should not be in the project list anymore
for (Project p : newProjects) {
}
// p1 should be there
for (Project p : newProjects) {
newP1 = p;
break;
}
}
// The properties of p1 should be preserved
assertEquals("project description",
}
/**
* Test of doIndexerExecution method, of class Indexer.
*/
@Test
public void testMain() throws IOException {
if (env.validateExuberantCtags()) {
String[] argv = {"-S", "-P", "-H", "-Q", "off", "-s", repository.getSourceRoot(), "-d", repository.getDataRoot(), "-v"};
} else {
}
}
private class MyIndexChangeListener implements org.opensolaris.opengrok.index.IndexChangedListener {
}
}
}
}
}
}
@Test
public void testRFE2575() throws Exception {
Repository r = null;
break;
}
}
listener = new MyIndexChangeListener();
} else {
System.out.println("Skipping test. Repository for rfe2575 not found or could not find a ctags or an sccs I could use in path.");
}
}
@Test
public void testXref() throws IOException {
continue;
}
try {
} catch (UnsupportedOperationException exp) {
// ignore
}
}
}
@Test
public void testBug3430() throws Exception {
if (env.validateExuberantCtags()) {
} else {
}
}
@Test
public void testBug11896() throws Exception {
boolean test = true;
test = false;
}
if (test) {
if (env.validateExuberantCtags()) {
} else {
}
} else {
}
}
}