Skip to content

Commit d98bd6a

Browse files
committed
Add integrated tests for regexps in python code
1 parent bd7c754 commit d98bd6a

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.PHONY: all test release
22

33
all:
4-
npm install syntaxdev@0.0.5
4+
npm install syntaxdev@0.0.6
55

66
test: release
77
# Run tests
8-
./node_modules/.bin/syntaxdev test --tests test/**/*.py --syntax grammars/MagicPython.YAML-tmLanguage
8+
./node_modules/.bin/syntaxdev test --tests test/**/*.py --syntax grammars/MagicPython.YAML-tmLanguage --add-syntax grammars/MagicRegExp.YAML-tmLanguage
99
./node_modules/.bin/syntaxdev test --tests test/**/*.regexp --syntax grammars/MagicRegExp.YAML-tmLanguage
1010

1111
# Check if the version specified in "package.json" matches the latest git tag

test/regexp/python1.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
a = R'[a-z]'
2+
a = r'[a-z]'
3+
4+
5+
6+
a : source.python
7+
= : keyword.operator.assignment.python, source.python
8+
: source.python
9+
R : source.python, storage.type.string.python, string.quoted.single.raw.python
10+
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.raw.python
11+
[ : constant.other.set.regexp punctuation.character.set.begin.regexp, meta.character.set.regexp, source.python, string.quoted.single.raw.python
12+
a : constant.character.set.regexp, meta.character.set.regexp, source.python, string.quoted.single.raw.python
13+
- : constant.character.set.regexp, meta.character.set.regexp, source.python, string.quoted.single.raw.python
14+
z : constant.character.set.regexp, meta.character.set.regexp, source.python, string.quoted.single.raw.python
15+
] : constant.other.set.regexp punctuation.character.set.end.regexp, meta.character.set.regexp, source.python, string.quoted.single.raw.python
16+
' : punctuation.definition.string.end.python, source.python, string.quoted.single.raw.python
17+
a : source.python
18+
= : keyword.operator.assignment.python, source.python
19+
: source.python
20+
r : source.python, storage.type.string.python, string.quoted.single.raw.python
21+
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.raw.python
22+
[a-z] : source.python, string.quoted.single.raw.python
23+
' : punctuation.definition.string.end.python, source.python, string.quoted.single.raw.python

0 commit comments

Comments
 (0)