aboutsummaryrefslogtreecommitdiff
path: root/tests/test_string.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_string.py')
-rw-r--r--tests/test_string.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_string.py b/tests/test_string.py
index 5d3040b..1101d26 100644
--- a/tests/test_string.py
+++ b/tests/test_string.py
@@ -4,3 +4,19 @@ import io
def test_escaped_parenthesis():
assert list(r"\(") == list(colorize(io.StringIO(r"\(")))
+
+
+def test_escaped_parenthesis_in_string():
+ assert list(r"'\('") == list(colorize(io.StringIO(r"'\('")))
+
+
+def test_escaped_quot_in_string():
+ assert list(r"'\''") == list(colorize(io.StringIO(r"'\''")))
+
+
+def test_embedded_string():
+ assert list(colorize(io.StringIO("( '(' )"))) == [
+ Colored(depth=0, item='('),
+ *" '(' ",
+ Colored(depth=0, item=')'),
+ ]