1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add tests and fixes some issues

This commit is contained in:
Jordi Boggiano 2011-11-05 23:51:35 +01:00
parent d4b7f802df
commit b7f6cf69ab
13 changed files with 256 additions and 13 deletions

View file

@ -42,6 +42,15 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
$this->expectParseException('unescaped backslash (\\) on line 2, char 12', $json);
}
public function testParseErrorSkipsEscapedBackslash()
{
$json = '{
"fo\\\\o": "bar"
"a": "b"
}';
$this->expectParseException('missing comma on line 2, char 23', $json);
}
public function testParseErrorDetectSingleQuotes()
{
$json = '{