// Create a bogus cfs file shadowing a non-cfs segment:
assertTrue(dir.fileExists("_3.fdt"));
assertTrue(!dir.fileExists("_3.cfs"));
copyFile(dir, "_1.cfs", "_3.cfs");
String[] filesPre = dir.listAll();
// Open & close a writer: it should delete the above 4
// files and nothing more:
writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND));
writer.close();