summaryrefslogtreecommitdiff
path: root/tests/lexers/tap/example.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lexers/tap/example.txt')
-rw-r--r--tests/lexers/tap/example.txt457
1 files changed, 457 insertions, 0 deletions
diff --git a/tests/lexers/tap/example.txt b/tests/lexers/tap/example.txt
new file mode 100644
index 00000000..b9e0c733
--- /dev/null
+++ b/tests/lexers/tap/example.txt
@@ -0,0 +1,457 @@
+---input---
+TAP version 13
+1..42
+1..13 A plan only supports directives so this text is wrong.
+ok 1 A normal test line includes a number.
+ok But a test line may also omit a number.
+
+A random line that does not look like a test or diagnostic should be ignored.
+ No matter how it is spaced out.
+
+Or if it is a totally blank line.
+
+not ok 3 This is a failing test line.
+
+# Diagnostics are any lines...
+# ... beginning with a hash character.
+
+not ok 4 There are a couple of directives. # TODO is one of those directives.
+not ok 5 # TODO: is invalid because the directive must be followed by a space.
+ok 6 - Another directive line # toDO is not case sensitive.
+
+ok 7 A line that is a # SKIP
+ok 8 Tests can be # skipped as long as the directive has the "skip" stem.
+ok 9 The TODO directive must be followed by a space, but # skip: is valid.
+1..0 # Skipped directives can show on a plan line too.
+
+Bail out! is a special phrase emitted when a TAP file aborted.
+
+not ok 10 Having TAP version 13 in the middle of a line is not a TAP version.
+not ok 11 Having Bail out! in the middle of a line is not a bail out.
+
+ok 12 Here is an empty directive. #
+
+# The most basic valid test lines.
+ok
+not ok
+
+ok 15 Only the test number should look different. Not another 42, for example.
+
+---tokens---
+'TAP version 13\n' Name.Namespace
+
+'1..42' Keyword.Declaration
+'\n' Comment
+
+'1..13' Keyword.Declaration
+' ' Text
+'A plan only supports directives so this text is wrong.\n' Generic.Error
+
+'ok' Keyword.Reserved
+' ' Text
+'1' Literal.Number.Integer
+' ' Text
+'A' Text
+' ' Text
+'normal' Text
+' ' Text
+'test' Text
+' ' Text
+'line' Text
+' ' Text
+'includes' Text
+' ' Text
+'a' Text
+' ' Text
+'number.' Text
+'\n' Text
+
+'ok' Keyword.Reserved
+' ' Text
+'But' Text
+' ' Text
+'a' Text
+' ' Text
+'test' Text
+' ' Text
+'line' Text
+' ' Text
+'may' Text
+' ' Text
+'also' Text
+' ' Text
+'omit' Text
+' ' Text
+'a' Text
+' ' Text
+'number.' Text
+'\n' Text
+
+'\n' Text
+
+'A random line that does not look like a test or diagnostic should be ignored.\n' Text
+
+' No matter how it is spaced out.\n' Text
+
+'\n' Text
+
+'Or if it is a totally blank line.\n' Text
+
+'\n' Text
+
+'not ok' Generic.Error
+' ' Text
+'3' Literal.Number.Integer
+' ' Text
+'This' Text
+' ' Text
+'is' Text
+' ' Text
+'a' Text
+' ' Text
+'failing' Text
+' ' Text
+'test' Text
+' ' Text
+'line.' Text
+'\n' Text
+
+'\n' Text
+
+'# Diagnostics are any lines...\n' Comment
+
+'# ... beginning with a hash character.\n' Comment
+
+'\n' Text
+
+'not ok' Generic.Error
+' ' Text
+'4' Literal.Number.Integer
+' ' Text
+'There' Text
+' ' Text
+'are' Text
+' ' Text
+'a' Text
+' ' Text
+'couple' Text
+' ' Text
+'of' Text
+' ' Text
+'directives.' Text
+' ' Text
+'#' Comment
+' ' Comment
+'TODO' Comment.Preproc
+' ' Comment
+'is' Comment
+' ' Comment
+'one' Comment
+' ' Comment
+'of' Comment
+' ' Comment
+'those' Comment
+' ' Comment
+'directives.' Comment
+'\n' Comment
+
+'not ok' Generic.Error
+' ' Text
+'5' Literal.Number.Integer
+' ' Text
+'#' Comment
+' ' Comment
+'TODO' Comment.Preproc
+':' Comment
+' ' Comment
+'is' Comment
+' ' Comment
+'invalid' Comment
+' ' Comment
+'because' Comment
+' ' Comment
+'the' Comment
+' ' Comment
+'directive' Comment
+' ' Comment
+'must' Comment
+' ' Comment
+'be' Comment
+' ' Comment
+'followed' Comment
+' ' Comment
+'by' Comment
+' ' Comment
+'a' Comment
+' ' Comment
+'space.' Comment
+'\n' Comment
+
+'ok' Keyword.Reserved
+' ' Text
+'6' Literal.Number.Integer
+' ' Text
+'-' Text
+' ' Text
+'Another' Text
+' ' Text
+'directive' Text
+' ' Text
+'line' Text
+' ' Text
+'#' Comment
+' ' Comment
+'toDO' Comment.Preproc
+' ' Comment
+'is' Comment
+' ' Comment
+'not' Comment
+' ' Comment
+'case' Comment
+' ' Comment
+'sensitive.' Comment
+'\n' Comment
+
+'\n' Text
+
+'ok' Keyword.Reserved
+' ' Text
+'7' Literal.Number.Integer
+' ' Text
+'A' Text
+' ' Text
+'line' Text
+' ' Text
+'that' Text
+' ' Text
+'is' Text
+' ' Text
+'a' Text
+' ' Text
+'#' Comment
+' ' Comment
+'SKIP' Comment.Preproc
+'\n' Comment
+
+'ok' Keyword.Reserved
+' ' Text
+'8' Literal.Number.Integer
+' ' Text
+'Tests' Text
+' ' Text
+'can' Text
+' ' Text
+'be' Text
+' ' Text
+'#' Comment
+' ' Comment
+'skipped' Comment.Preproc
+' ' Comment
+'as' Comment
+' ' Comment
+'long' Comment
+' ' Comment
+'as' Comment
+' ' Comment
+'the' Comment
+' ' Comment
+'directive' Comment
+' ' Comment
+'has' Comment
+' ' Comment
+'the' Comment
+' ' Comment
+'"skip"' Comment
+' ' Comment
+'stem.' Comment
+'\n' Comment
+
+'ok' Keyword.Reserved
+' ' Text
+'9' Literal.Number.Integer
+' ' Text
+'The' Text
+' ' Text
+'TODO' Text
+' ' Text
+'directive' Text
+' ' Text
+'must' Text
+' ' Text
+'be' Text
+' ' Text
+'followed' Text
+' ' Text
+'by' Text
+' ' Text
+'a' Text
+' ' Text
+'space,' Text
+' ' Text
+'but' Text
+' ' Text
+'#' Comment
+' ' Comment
+'skip:' Comment.Preproc
+' ' Comment
+'is' Comment
+' ' Comment
+'valid.' Comment
+'\n' Comment
+
+'1..0' Keyword.Declaration
+' ' Text
+'#' Comment
+' ' Comment
+'Skipped' Comment.Preproc
+' ' Comment
+'directives' Comment
+' ' Comment
+'can' Comment
+' ' Comment
+'show' Comment
+' ' Comment
+'on' Comment
+' ' Comment
+'a' Comment
+' ' Comment
+'plan' Comment
+' ' Comment
+'line' Comment
+' ' Comment
+'too.' Comment
+'\n' Comment
+
+'\n' Text
+
+'Bail out! is a special phrase emitted when a TAP file aborted.\n' Generic.Error
+
+'\n' Text
+
+'not ok' Generic.Error
+' ' Text
+'10' Literal.Number.Integer
+' ' Text
+'Having' Text
+' ' Text
+'TAP' Text
+' ' Text
+'version' Text
+' ' Text
+'13' Text
+' ' Text
+'in' Text
+' ' Text
+'the' Text
+' ' Text
+'middle' Text
+' ' Text
+'of' Text
+' ' Text
+'a' Text
+' ' Text
+'line' Text
+' ' Text
+'is' Text
+' ' Text
+'not' Text
+' ' Text
+'a' Text
+' ' Text
+'TAP' Text
+' ' Text
+'version.' Text
+'\n' Text
+
+'not ok' Generic.Error
+' ' Text
+'11' Literal.Number.Integer
+' ' Text
+'Having' Text
+' ' Text
+'Bail' Text
+' ' Text
+'out!' Text
+' ' Text
+'in' Text
+' ' Text
+'the' Text
+' ' Text
+'middle' Text
+' ' Text
+'of' Text
+' ' Text
+'a' Text
+' ' Text
+'line' Text
+' ' Text
+'is' Text
+' ' Text
+'not' Text
+' ' Text
+'a' Text
+' ' Text
+'bail' Text
+' ' Text
+'out.' Text
+'\n' Text
+
+'\n' Text
+
+'ok' Keyword.Reserved
+' ' Text
+'12' Literal.Number.Integer
+' ' Text
+'Here' Text
+' ' Text
+'is' Text
+' ' Text
+'an' Text
+' ' Text
+'empty' Text
+' ' Text
+'directive.' Text
+' ' Text
+'#' Comment
+'\n' Comment
+
+'\n' Text
+
+'# The most basic valid test lines.\n' Comment
+
+'ok' Keyword.Reserved
+'\n' Text
+
+'not ok' Generic.Error
+'\n' Text
+
+'\n' Text
+
+'ok' Keyword.Reserved
+' ' Text
+'15' Literal.Number.Integer
+' ' Text
+'Only' Text
+' ' Text
+'the' Text
+' ' Text
+'test' Text
+' ' Text
+'number' Text
+' ' Text
+'should' Text
+' ' Text
+'look' Text
+' ' Text
+'different.' Text
+' ' Text
+'Not' Text
+' ' Text
+'another' Text
+' ' Text
+'42,' Text
+' ' Text
+'for' Text
+' ' Text
+'example.' Text
+'\n' Text