diff options
| author | Tim Martin <tim@timmart.in> | 2022-09-21 13:17:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-21 20:17:14 +0200 |
| commit | d48686deae70c734a916886c9f93185dcd40494d (patch) | |
| tree | d24f1e2b1478a97712c43a4b4d06353781ff4f5f /tests/examplefiles/wowtoc | |
| parent | f59a3ef2e7a678074ccb3dce0d9b54e4123e449f (diff) | |
| download | pygments-git-d48686deae70c734a916886c9f93185dcd40494d.tar.gz | |
Add World of Warcraft TOC file lexer (#2244)
Also fix a broken link and decode as UTF8 in count_token_references.py.
Diffstat (limited to 'tests/examplefiles/wowtoc')
| -rw-r--r-- | tests/examplefiles/wowtoc/comments.toc | 6 | ||||
| -rw-r--r-- | tests/examplefiles/wowtoc/comments.toc.output | 17 | ||||
| -rw-r--r-- | tests/examplefiles/wowtoc/files.toc | 3 | ||||
| -rw-r--r-- | tests/examplefiles/wowtoc/files.toc.output | 8 | ||||
| -rw-r--r-- | tests/examplefiles/wowtoc/official_tags.toc | 63 | ||||
| -rw-r--r-- | tests/examplefiles/wowtoc/official_tags.toc.output | 503 | ||||
| -rw-r--r-- | tests/examplefiles/wowtoc/other_tags.toc | 6 | ||||
| -rw-r--r-- | tests/examplefiles/wowtoc/other_tags.toc.output | 45 |
8 files changed, 651 insertions, 0 deletions
diff --git a/tests/examplefiles/wowtoc/comments.toc b/tests/examplefiles/wowtoc/comments.toc new file mode 100644 index 00000000..381fd898 --- /dev/null +++ b/tests/examplefiles/wowtoc/comments.toc @@ -0,0 +1,6 @@ +# +#a +# a comment +# a comment with a # in it +## no comma, thus a comment +## has space: and is thus, a comment
\ No newline at end of file diff --git a/tests/examplefiles/wowtoc/comments.toc.output b/tests/examplefiles/wowtoc/comments.toc.output new file mode 100644 index 00000000..2d69add1 --- /dev/null +++ b/tests/examplefiles/wowtoc/comments.toc.output @@ -0,0 +1,17 @@ +'#' Comment +'\n' Text + +'#a' Comment +'\n' Text + +'# a comment' Comment +'\n' Text + +'# a comment with a # in it' Comment +'\n' Text + +'## no comma, thus a comment' Comment +'\n' Text + +'## has space: and is thus, a comment' Comment +'\n' Text diff --git a/tests/examplefiles/wowtoc/files.toc b/tests/examplefiles/wowtoc/files.toc new file mode 100644 index 00000000..172cf102 --- /dev/null +++ b/tests/examplefiles/wowtoc/files.toc @@ -0,0 +1,3 @@ +a +Foo.lua +Spaces allowed.lua
\ No newline at end of file diff --git a/tests/examplefiles/wowtoc/files.toc.output b/tests/examplefiles/wowtoc/files.toc.output new file mode 100644 index 00000000..135f22c3 --- /dev/null +++ b/tests/examplefiles/wowtoc/files.toc.output @@ -0,0 +1,8 @@ +'a' Name +'\n' Text + +'Foo.lua' Name +'\n' Text + +'Spaces allowed.lua' Name +'\n' Text diff --git a/tests/examplefiles/wowtoc/official_tags.toc b/tests/examplefiles/wowtoc/official_tags.toc new file mode 100644 index 00000000..e8c017e5 --- /dev/null +++ b/tests/examplefiles/wowtoc/official_tags.toc @@ -0,0 +1,63 @@ +## TiTlE-ptBR: value +## TiTlE-zhCN: value +## TiTlE-enCN: value +## TiTlE-frFR: value +## TiTlE-deDE: value +## TiTlE-itIT: value +## TiTlE-esMX: value +## TiTlE-ptPT: value +## TiTlE-koKR: value +## TiTlE-ruRU: value +## TiTlE-esES: value +## TiTlE-zhTW: value +## TiTlE-enTW: value +## TiTlE-enGB: value +## TiTlE-enUS: value +## NoTeS-ptBR: value +## NoTeS-zhCN: value +## NoTeS-enCN: value +## NoTeS-frFR: value +## NoTeS-deDE: value +## NoTeS-itIT: value +## NoTeS-esMX: value +## NoTeS-ptPT: value +## NoTeS-koKR: value +## NoTeS-ruRU: value +## NoTeS-esES: value +## NoTeS-zhTW: value +## NoTeS-enTW: value +## NoTeS-enGB: value +## NoTeS-enUS: value +## Interface: value +## interface: value +## Title: value +## title: value +## Notes: value +## notes: value +## RequiredDeps: value +## requireddeps: value +## Dependencies: value +## dependencies: value +## OptionalDeps: value +## optionaldeps: value +## LoadOnDemand: value +## loadondemand: value +## LoadWith: value +## loadwith: value +## LoadManagers: value +## loadmanagers: value +## SavedVariablesPerCharacter: value +## savedvariablespercharacter: value +## SavedVariables: value +## savedvariables: value +## DefaultState: value +## defaultstate: value +## Secure: value +## secure: value +## Author: value +## author: value +## Version: value +## version: value +## Dep: value +## dep: value +## DepSomething: value diff --git a/tests/examplefiles/wowtoc/official_tags.toc.output b/tests/examplefiles/wowtoc/official_tags.toc.output new file mode 100644 index 00000000..90037ea0 --- /dev/null +++ b/tests/examplefiles/wowtoc/official_tags.toc.output @@ -0,0 +1,503 @@ +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-ptBR' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-zhCN' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-enCN' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-frFR' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-deDE' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-itIT' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-esMX' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-ptPT' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-koKR' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-ruRU' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-esES' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-zhTW' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-enTW' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-enGB' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'TiTlE-enUS' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-ptBR' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-zhCN' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-enCN' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-frFR' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-deDE' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-itIT' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-esMX' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-ptPT' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-koKR' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-ruRU' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-esES' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-zhTW' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-enTW' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-enGB' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoTeS-enUS' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Interface' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'interface' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Title' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'title' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Notes' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'notes' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'RequiredDeps' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'requireddeps' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Dependencies' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'dependencies' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'OptionalDeps' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'optionaldeps' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'LoadOnDemand' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'loadondemand' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'LoadWith' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'loadwith' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'LoadManagers' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'loadmanagers' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'SavedVariablesPerCharacter' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'savedvariablespercharacter' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'SavedVariables' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'savedvariables' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'DefaultState' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'defaultstate' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Secure' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'secure' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Author' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'author' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Version' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'version' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Dep' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'dep' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'DepSomething' Name.Builtin +':' Punctuation +' ' Text.Whitespace +'value' Literal.String +'\n' Text diff --git a/tests/examplefiles/wowtoc/other_tags.toc b/tests/examplefiles/wowtoc/other_tags.toc new file mode 100644 index 00000000..30ed8478 --- /dev/null +++ b/tests/examplefiles/wowtoc/other_tags.toc @@ -0,0 +1,6 @@ +## X-Foo: Value +## Non-Conforming: Value +##no:whitespace +## plenty : of whitespace +## NoValueOk: +## other intermediate non-space whitespace: is ok diff --git a/tests/examplefiles/wowtoc/other_tags.toc.output b/tests/examplefiles/wowtoc/other_tags.toc.output new file mode 100644 index 00000000..15acbb52 --- /dev/null +++ b/tests/examplefiles/wowtoc/other_tags.toc.output @@ -0,0 +1,45 @@ +'##' Keyword.Declaration +' ' Text.Whitespace +'X-Foo' Name.Variable +':' Punctuation +' ' Text.Whitespace +'Value' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'Non-Conforming' Name.Other +':' Punctuation +' ' Text.Whitespace +'Value' Literal.String +'\n' Text + +'##' Keyword.Declaration +'no' Name.Other +':' Punctuation +'whitespace' Literal.String +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'plenty' Name.Other +' ' Text.Whitespace +':' Punctuation +' ' Text.Whitespace +'of whitespace' Literal.String +' ' Text.Whitespace +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'NoValueOk' Name.Other +':' Punctuation +'\n' Text + +'##' Keyword.Declaration +' ' Text.Whitespace +'other\tintermediate\tnon-space\twhitespace' Name.Other +':' Punctuation +' ' Text.Whitespace +'is ok' Literal.String +'\n' Text |
