summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2021-06-20 10:52:45 +0200
committerGeorg Brandl <georg@python.org>2021-06-20 10:52:48 +0200
commit1664557be85cb45d38cc419500717ffde9392016 (patch)
tree8858d11bf7ee63cc13a0229fab1175e5bd49bff1 /tests
parentfaf69c028f0efa7798a938163e8432d838acfda2 (diff)
downloadpygments-git-1664557be85cb45d38cc419500717ffde9392016.tar.gz
Rust: fix lexing of "break" and "continue"
fixes #1843
Diffstat (limited to 'tests')
-rw-r--r--tests/snippets/rust/test_break.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/snippets/rust/test_break.txt b/tests/snippets/rust/test_break.txt
new file mode 100644
index 00000000..7dafde2d
--- /dev/null
+++ b/tests/snippets/rust/test_break.txt
@@ -0,0 +1,39 @@
+---input---
+loop {
+ break;
+ break 'foo;
+ break'foo;
+ break_it;
+}
+
+---tokens---
+'loop' Keyword
+' ' Text.Whitespace
+'{' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'break' Keyword
+';' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'break' Keyword
+' ' Text.Whitespace
+"'foo" Name.Label
+';' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'break' Keyword
+"'foo" Name.Label
+';' Punctuation
+'\n' Text.Whitespace
+
+' ' Text.Whitespace
+'break_it' Name
+';' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace