summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/jq_tests.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/jq_tests.py b/tests/jq_tests.py
index e293aa1..192c4db 100644
--- a/tests/jq_tests.py
+++ b/tests/jq_tests.py
@@ -1,3 +1,5 @@
+# coding=utf8
+
from nose.tools import istest, assert_equal, assert_raises
from jq import jq
@@ -70,3 +72,19 @@ def multiple_inputs_in_raw_input_are_separated_by_newlines():
@istest
def value_error_is_raised_if_program_is_invalid():
assert_raises(ValueError, lambda: jq("!"))
+
+
+@istest
+def unicode_strings_can_be_used_as_input():
+ assert_equal(
+ u"‽",
+ jq(".").transform(u'"‽"', raw_input=True)
+ )
+
+
+@istest
+def unicode_strings_can_be_used_as_programs():
+ assert_equal(
+ u"Dragon‽",
+ jq(u'.+"‽"').transform(u'"Dragon"', raw_input=True)
+ )