From ba4fdfdddf5cc30a7f63c359560fd872eed7aa63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Mon, 11 Mar 2024 15:33:59 +0100 Subject: [PATCH] ADD additional test case in test_context_as_argumnet.py --- tests/test_context_as_argument.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_context_as_argument.py b/tests/test_context_as_argument.py index bc4ca4d..19604d3 100644 --- a/tests/test_context_as_argument.py +++ b/tests/test_context_as_argument.py @@ -34,3 +34,12 @@ def test_context_as_argument(self): result = jexl.evaluate(expression, context2) self.assertEqual(result, False) + + def test_context_as_argument_2(self): + jexl = JEXL() + + context = {"S": "a given string", "init": 2, "finish": 5} + expression = 'S|substring(init,finish)' + + result = jexl.evaluate(expression, context) + self.assertEqual(result, 'giv')