diff options
| author | Michael Williamson <mike@zwobble.org> | 2020-10-11 11:54:37 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2020-10-11 11:57:34 +0100 |
| commit | 14393f779c2c9e2e0c99863b193738ba29a6660a (patch) | |
| tree | 4ea399a48c4dc3821526544e5b3c5b34a5e2460a /tests | |
| parent | 54467df8c6f06c2d4421ab5d0446d7cd8f5040e1 (diff) | |
Add support for predefined variables
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/jq_tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/jq_tests.py b/tests/jq_tests.py index 6b63556..7956d56 100644 --- a/tests/jq_tests.py +++ b/tests/jq_tests.py @@ -185,6 +185,14 @@ def unicode_strings_can_be_used_as_programs(): @istest +def compiling_with_args_should_set_predefined_variables(): + assert_equal( + 123, + jq.compile("$a + $b + .", args={"a": 100, "b": 20}).input(3).first() + ) + + +@istest def repr_of_compile_result_is_compilation_string(): program = jq.compile(".") repr_string = repr(program) |
