diff options
| author | Michael Williamson <mike@zwobble.org> | 2021-08-02 18:23:55 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2021-08-02 18:24:56 +0100 |
| commit | 2e4bc0ff1c9e59121e715e489a6fc102ada93e15 (patch) | |
| tree | d8e4ac7c5f630d2654d3cc93bc539f176dcbd589 /tests | |
| parent | 337c0f8baf77a59f9054eefc07460fffe91702ce (diff) | |
Use custom integer check to handle large ints larger than 32 bits
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/jq_tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/jq_tests.py b/tests/jq_tests.py index b5bbbd1..4eab9f7 100644 --- a/tests/jq_tests.py +++ b/tests/jq_tests.py @@ -165,6 +165,15 @@ def test_unicode_strings_can_be_used_as_programs(): ) +def test_returned_integers_larger_than_32_bits_have_int_type(): + program = jq.compile("pow(.; 33)") + + result = program.input(2).first() + + assert_equal(2 ** 33, result) + assert_equal(int, type(result)) + + def test_compiling_with_args_should_set_predefined_variables(): assert_equal( 123, |
