summaryrefslogtreecommitdiff
path: root/tests/jq_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/jq_tests.py')
-rw-r--r--tests/jq_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/jq_tests.py b/tests/jq_tests.py
index 192c4db..dfb7112 100644
--- a/tests/jq_tests.py
+++ b/tests/jq_tests.py
@@ -71,6 +71,14 @@ def multiple_inputs_in_raw_input_are_separated_by_newlines():
@istest
def value_error_is_raised_if_program_is_invalid():
+ try:
+ jq("!")
+ assert False, "Expected error"
+ except ValueError as error:
+ expected_error_str = """error: syntax error, unexpected INVALID_CHARACTER, expecting $end
+!
+1 compile error"""
+ assert_equal(str(error), expected_error_str)
assert_raises(ValueError, lambda: jq("!"))