Skip to content

Commit 11b41cb

Browse files
committed
Add unicode test case.
1 parent c534869 commit 11b41cb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test_quickjs.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,15 @@ def test_dict(self):
211211
return obj.data;
212212
}""")
213213
self.assertEqual(f({"data": {"value": 42}}), {"value": 42})
214+
215+
216+
class Strings(unittest.TestCase):
217+
def test_unicode(self):
218+
identity = quickjs.Function(
219+
"identity", """
220+
function identity(x) {
221+
return x;
222+
}
223+
""")
224+
for x in ["äpple", "≤≥", "☺"]:
225+
self.assertEqual(identity(x), x)

0 commit comments

Comments
 (0)