aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-02-03 15:02:40 +1100
committerNeil <nyamatongwe@gmail.com>2020-02-03 15:02:40 +1100
commiteaf67d1e62ffb55eefb92bb91d8d88e56d7cbef0 (patch)
tree971734673d54c8ec9fb0dc316d31da2000ce7c41
parent610e48573cb7c5ce2cc7a146a406257ef2890468 (diff)
downloadscintilla-mirror-eaf67d1e62ffb55eefb92bb91d8d88e56d7cbef0.tar.gz
Bug [#2139]. Add test case for compound decorator.
This is before-fix and demonstrates the issue. Remove the .new file as that is a temporary.
-rw-r--r--lexilla/test/examples/python/SciTE.properties2
-rw-r--r--lexilla/test/examples/python/x.py8
-rw-r--r--lexilla/test/examples/python/x.py.new11
-rw-r--r--lexilla/test/examples/python/x.py.styled8
4 files changed, 17 insertions, 12 deletions
diff --git a/lexilla/test/examples/python/SciTE.properties b/lexilla/test/examples/python/SciTE.properties
index 164a30d52..0425c7a2a 100644
--- a/lexilla/test/examples/python/SciTE.properties
+++ b/lexilla/test/examples/python/SciTE.properties
@@ -1,2 +1,2 @@
lexer.*.py=python
-keywords.*.py=class def else for if import in print return while
+keywords.*.py=class def else for if import in pass print return while with yield
diff --git a/lexilla/test/examples/python/x.py b/lexilla/test/examples/python/x.py
index 12c4b71df..57833c059 100644
--- a/lexilla/test/examples/python/x.py
+++ b/lexilla/test/examples/python/x.py
@@ -9,3 +9,11 @@ def depunctuate(s):
else:
d = d + " "
return d
+
+import contextlib
+
+@contextlib.contextmanager
+def singleuse():
+ print("Before")
+ yield
+with singleuse(): pass
diff --git a/lexilla/test/examples/python/x.py.new b/lexilla/test/examples/python/x.py.new
deleted file mode 100644
index 983c3b83c..000000000
--- a/lexilla/test/examples/python/x.py.new
+++ /dev/null
@@ -1,11 +0,0 @@
-{1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0}
-{5}def{0} {9}depunctuate{10}({11}s{10}):{0}
- {6}'''A docstring'''{0}
- {7}"""Docstring 2"""{0}
- {11}d{0} {10}={0} {3}""{0}
- {5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0}
- {5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0}
- {11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0}
- {5}else{10}:{0}
- {11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0}
- {5}return{0} {11}d{0}
diff --git a/lexilla/test/examples/python/x.py.styled b/lexilla/test/examples/python/x.py.styled
index 02f94a923..8ba7513c8 100644
--- a/lexilla/test/examples/python/x.py.styled
+++ b/lexilla/test/examples/python/x.py.styled
@@ -9,3 +9,11 @@
{5}else{10}:{0}
{11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0}
{5}return{0} {11}d{0}
+
+{5}import{0} {11}contextlib{0}
+
+{15}@contextlib{10}.{11}contextmanager{0}
+{5}def{0} {9}singleuse{10}():{0}
+ {5}print{10}({3}"Before"{10}){0}
+ {5}yield{0}
+{5}with{0} {11}singleuse{10}():{0} {5}pass{0}