* Truncated uuencoded files used to cause infinite loops. Verify that
* they work now.
*/
@Test
public void truncatedUuencodedFile() throws IOException {
UuencodeFullTokenizer tokenizer = new UuencodeFullTokenizer(
new StringReader("begin 644 test\n"));
CharTermAttribute term = tokenizer.addAttribute(CharTermAttribute.class);
assertTrue(tokenizer.incrementToken());
assertEquals("begin", term.toString());
assertTrue(tokenizer.incrementToken());
assertEquals("644", term.toString());
assertTrue(tokenizer.incrementToken());
assertEquals("test", term.toString());
// This call used to hang forever.
assertFalse(tokenizer.incrementToken());
}