Page MenuHomePhabricator

D9638.diff
No OneTemporary

D9638.diff

diff --git a/src/parser/__tests__/PhutilJSONParserTestCase.php b/src/parser/__tests__/PhutilJSONParserTestCase.php
--- a/src/parser/__tests__/PhutilJSONParserTestCase.php
+++ b/src/parser/__tests__/PhutilJSONParserTestCase.php
@@ -16,6 +16,12 @@
'{"foo": "bar", "bar": {"baz": "foo"}}'
=> array('foo' => 'bar', 'bar' => array('baz' => 'foo')),
'{"": ""}' => array('' => ''),
+ '{"test":"\u00c9v\u00e9nement"}'
+ => array('test' => "\xC3\x89v\xC3\xA9nement"),
+ '["\u00c9v\u00e9nement"]' => array("\xC3\x89v\xC3\xA9nement"),
+ '{"test":"http:\/\/foo\\\\zomg"}'
+ => array('test' => 'http://foo\\zomg'),
+ '["http:\/\/foo\\\\zomg"]' => array('http://foo\\zomg'),
);
foreach ($tests as $input => $expect) {
@@ -70,6 +76,16 @@
'char' => 1,
'token' => 'INVALID',
),
+ "{\"foo\": \"bar\nbaz\"}" => array(
+ 'line' => 1,
+ 'char' => 7,
+ 'token' => 'INVALID',
+ ),
+ '{"foo": "bar\z"}' => array(
+ 'line' => 1,
+ 'char' => 7,
+ 'token' => 'INVALID',
+ ),
);
foreach ($tests as $input => $expected) {

File Metadata

Mime Type
text/plain
Expires
Sat, Jul 6, 10:57 PM (3 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6293877
Default Alt Text
D9638.diff (1 KB)

Event Timeline