public void testRun() throws Exception {
  StringWriter sw=new StringWriter();
  PrintWriter pw=new PrintWriter(sw,true);
  final int MAX_DOCS=atLeast(225);
  doTest(random(),pw,false,MAX_DOCS);
  pw.close();
  sw.close();
  String multiFileOutput=sw.toString();
  sw=new StringWriter();
  pw=new PrintWriter(sw,true);
  doTest(random(),pw,true,MAX_DOCS);
  pw.close();
  sw.close();
  String singleFileOutput=sw.toString();
  assertEquals(multiFileOutput,singleFileOutput);
}

public void testRun ( ) throws Exception { StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw , true ) ; final int MAX_DOCS = atLeast ( 225 ) ; doTest ( random ( ) , pw , false , MAX_DOCS ) ; pw . close ( ) ; sw . close ( ) ; String multiFileOutput = sw . toString ( ) ; sw = new StringWriter ( ) ; pw = new PrintWriter ( sw , true ) ; doTest ( random ( ) , pw , true , MAX_DOCS ) ; pw . close ( ) ; sw . close ( ) ; String singleFileOutput = sw . toString ( ) ; assertEquals ( multiFileOutput , singleFileOutput ) ; }
this test compares search results when using and not using compound files . todo : there is rudimentary search result validation as well , but it is simply based on asserting the output observed in the old test case , without really knowing if the output is correct . someone needs to validate this output and make any changes to the checkhits method .
