mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-11 10:25:47 +02:00
Fixed bug #3139677: JSON [1 2 3] was incorrectly parsed as [1, 3]. Error is now correctly detected.
Modified runjsontests.py to allow test that expect failure in jsoncpp test suite.
This commit is contained in:
1
test/data/fail_test_array_01.json
Normal file
1
test/data/fail_test_array_01.json
Normal file
@@ -0,0 +1 @@
|
||||
[ 1 2 3]
|
@@ -49,7 +49,8 @@ def runAllTests( jsontest_executable_path, input_dir = None,
|
||||
failed_tests = []
|
||||
valgrind_path = use_valgrind and VALGRIND_CMD or ''
|
||||
for input_path in tests + test_jsonchecker:
|
||||
is_json_checker_test = input_path in test_jsonchecker
|
||||
expect_failure = os.path.basename( input_path ).startswith( 'fail' )
|
||||
is_json_checker_test = (input_path in test_jsonchecker) or expect_failure
|
||||
print 'TESTING:', input_path,
|
||||
options = is_json_checker_test and '--json-checker' or ''
|
||||
pipe = os.popen( "%s%s %s %s" % (
|
||||
@@ -58,7 +59,6 @@ def runAllTests( jsontest_executable_path, input_dir = None,
|
||||
process_output = pipe.read()
|
||||
status = pipe.close()
|
||||
if is_json_checker_test:
|
||||
expect_failure = os.path.basename( input_path ).startswith( 'fail' )
|
||||
if expect_failure:
|
||||
if status is None:
|
||||
print 'FAILED'
|
||||
|
Reference in New Issue
Block a user