parser = new RawFieldParser();
}
public void testBasicTokenParsing() throws Exception {
String s = " raw: \" some stuff \"";
ByteSequence raw = ContentUtil.encode(s);
ParserCursor cursor = new ParserCursor(0, s.length());
parser.skipWhiteSpace(raw, cursor);
Assert.assertFalse(cursor.atEnd());
Assert.assertEquals(3, cursor.getPos());
StringBuilder strbuf1 = new StringBuilder();
parser.copyContent(raw, cursor, RawFieldParser.INIT_BITSET(':'), strbuf1);
Assert.assertFalse(cursor.atEnd());
Assert.assertEquals(6, cursor.getPos());
Assert.assertEquals("raw", strbuf1.toString());
Assert.assertEquals(':', raw.byteAt(cursor.getPos()));
cursor.updatePos(cursor.getPos() + 1);
parser.skipWhiteSpace(raw, cursor);
Assert.assertFalse(cursor.atEnd());