Commit 1c61fbad authored by Chris Coughlin's avatar Chris Coughlin

Improved detection of textual data files

parent 67d7b934
......@@ -124,4 +124,16 @@ public class FileSnifferTest {
assertEquals(direct.getHeight(), d.getHeight());
assertTrue(Arrays.equals(direct.getData(), d.getData()));
}
@Test
public void isText() throws Exception {
File[] textFiles = {csvFile, txtFile};
File[] otherFiles = {jpgFile, tifFile, dicomFile};
for (File textFile : textFiles) {
assertTrue(FileSniffer.isText(textFile));
}
for (File other : otherFiles) {
assertFalse(FileSniffer.isText(other));
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment