Skip to content

Commit

Permalink
Add test for FasterXML#148
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmac committed Aug 11, 2014
1 parent ce25ff4 commit 4c6da5f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/java/com/fasterxml/jackson/core/json/TestUtf8Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,14 @@ public void testNextFieldName() throws IOException
assertEquals(parser.nextToken(), JsonToken.END_OBJECT);
parser.close();
}

public void testNullPrefixedFieldNames() throws Exception
{
String[] expectedTexts = { "{", "\u0000abc", "a", "abc", "b", "}" };
JsonParser parser = new JsonFactory().createParser("{\"\\u0000abc\" : \"a\", \"abc\" : \"b\"}".getBytes());
for(String expected : expectedTexts) {
parser.nextToken();
assertEquals(parser.getText(), expected);
}
}
}

0 comments on commit 4c6da5f

Please sign in to comment.