mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
15
spec/unsupported_lexers/md/test_bold_fenced_by_asterisk.txt
Normal file
15
spec/unsupported_lexers/md/test_bold_fenced_by_asterisk.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
**bold**
|
||||
|
||||
(**bold**)
|
||||
|
||||
---tokens---
|
||||
'**bold**' Generic.Strong
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'(' Text
|
||||
'**bold**' Generic.Strong
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
__bold__
|
||||
|
||||
(__bold__)
|
||||
|
||||
---tokens---
|
||||
'__bold__' Generic.Strong
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'(' Text
|
||||
'__bold__' Generic.Strong
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
14
spec/unsupported_lexers/md/test_bulleted_list_1.txt
Normal file
14
spec/unsupported_lexers/md/test_bulleted_list_1.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
* foo
|
||||
* bar
|
||||
|
||||
---tokens---
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'foo' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'bar' Text
|
||||
'\n' Text.Whitespace
|
14
spec/unsupported_lexers/md/test_bulleted_list_2.txt
Normal file
14
spec/unsupported_lexers/md/test_bulleted_list_2.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
- foo
|
||||
- bar
|
||||
|
||||
---tokens---
|
||||
'-' Keyword
|
||||
' ' Text.Whitespace
|
||||
'foo' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'-' Keyword
|
||||
' ' Text.Whitespace
|
||||
'bar' Text
|
||||
'\n' Text.Whitespace
|
14
spec/unsupported_lexers/md/test_bulleted_list_3.txt
Normal file
14
spec/unsupported_lexers/md/test_bulleted_list_3.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
* *foo*
|
||||
* bar
|
||||
|
||||
---tokens---
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'*foo*' Generic.Emph
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'bar' Text
|
||||
'\n' Text.Whitespace
|
19
spec/unsupported_lexers/md/test_bulleted_list_4.txt
Normal file
19
spec/unsupported_lexers/md/test_bulleted_list_4.txt
Normal file
@ -0,0 +1,19 @@
|
||||
---input---
|
||||
```
|
||||
code
|
||||
```
|
||||
* *foo*
|
||||
* bar
|
||||
|
||||
---tokens---
|
||||
'```\ncode\n```\n' Literal.String.Backtick
|
||||
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'*foo*' Generic.Emph
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'bar' Text
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
```
|
||||
code
|
||||
```
|
||||
|
||||
```
|
||||
multi
|
||||
`line`
|
||||
code
|
||||
```
|
||||
|
||||
---tokens---
|
||||
'```\ncode\n```\n' Literal.String.Backtick
|
||||
|
||||
'\n```\nmulti\n`line`\ncode\n```\n' Literal.String.Backtick
|
16
spec/unsupported_lexers/md/test_code_block_with_language.txt
Normal file
16
spec/unsupported_lexers/md/test_code_block_with_language.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
```python
|
||||
import this
|
||||
```
|
||||
|
||||
---tokens---
|
||||
'```' Literal.String.Backtick
|
||||
'python' Literal.String.Backtick
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'import' Keyword.Namespace
|
||||
' ' Text
|
||||
'this' Name.Namespace
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'```\n' Literal.String.Backtick
|
23
spec/unsupported_lexers/md/test_escape_italics.txt
Normal file
23
spec/unsupported_lexers/md/test_escape_italics.txt
Normal file
@ -0,0 +1,23 @@
|
||||
---input---
|
||||
\*no italics\*
|
||||
|
||||
\_ no italics \_
|
||||
|
||||
---tokens---
|
||||
'\\*' Text
|
||||
'no' Text
|
||||
' ' Text
|
||||
'italics' Text
|
||||
'\\*' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\\_' Text
|
||||
' ' Text
|
||||
'no' Text
|
||||
' ' Text
|
||||
'italics' Text
|
||||
' ' Text
|
||||
'\\_' Text
|
||||
'\n' Text.Whitespace
|
36
spec/unsupported_lexers/md/test_inline_code.txt
Normal file
36
spec/unsupported_lexers/md/test_inline_code.txt
Normal file
@ -0,0 +1,36 @@
|
||||
---input---
|
||||
code: `code`
|
||||
|
||||
`**code**`
|
||||
|
||||
(`code`)
|
||||
|
||||
code (`in brackets`)
|
||||
|
||||
---tokens---
|
||||
'code:' Text
|
||||
' ' Text
|
||||
'`code`' Literal.String.Backtick
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text
|
||||
'`**code**`' Literal.String.Backtick
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'(' Text
|
||||
'`code`' Literal.String.Backtick
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'code' Text
|
||||
' ' Text
|
||||
'(' Text
|
||||
'`in brackets`' Literal.String.Backtick
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
19
spec/unsupported_lexers/md/test_inline_code_after_block.txt
Normal file
19
spec/unsupported_lexers/md/test_inline_code_after_block.txt
Normal file
@ -0,0 +1,19 @@
|
||||
---input---
|
||||
```
|
||||
code
|
||||
```
|
||||
* nocode
|
||||
* `code`
|
||||
|
||||
---tokens---
|
||||
'```\ncode\n```\n' Literal.String.Backtick
|
||||
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'nocode' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'`code`' Literal.String.Backtick
|
||||
'\n' Text.Whitespace
|
26
spec/unsupported_lexers/md/test_inline_code_in_list.txt
Normal file
26
spec/unsupported_lexers/md/test_inline_code_in_list.txt
Normal file
@ -0,0 +1,26 @@
|
||||
---input---
|
||||
* `code`
|
||||
|
||||
- `code`
|
||||
|
||||
1. `code`
|
||||
|
||||
---tokens---
|
||||
'*' Keyword
|
||||
' ' Text.Whitespace
|
||||
'`code`' Literal.String.Backtick
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'-' Keyword
|
||||
' ' Text.Whitespace
|
||||
'`code`' Literal.String.Backtick
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'1.' Keyword
|
||||
' ' Text
|
||||
'`code`' Literal.String.Backtick
|
||||
'\n' Text.Whitespace
|
31
spec/unsupported_lexers/md/test_invalid_bold.txt
Normal file
31
spec/unsupported_lexers/md/test_invalid_bold.txt
Normal file
@ -0,0 +1,31 @@
|
||||
---input---
|
||||
**no bold__
|
||||
|
||||
__no bold**
|
||||
|
||||
*no bold*
|
||||
|
||||
_no bold_
|
||||
|
||||
---tokens---
|
||||
'**no' Text
|
||||
' ' Text
|
||||
'bold__' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'__no' Text
|
||||
' ' Text
|
||||
'bold**' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text
|
||||
|
||||
'*no bold*' Generic.Emph
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text
|
||||
|
||||
'_no bold_' Generic.Emph
|
||||
'\n' Text.Whitespace
|
31
spec/unsupported_lexers/md/test_invalid_italics.txt
Normal file
31
spec/unsupported_lexers/md/test_invalid_italics.txt
Normal file
@ -0,0 +1,31 @@
|
||||
---input---
|
||||
*no italics_
|
||||
|
||||
_no italics*
|
||||
|
||||
**no italics**
|
||||
|
||||
__no italics__
|
||||
|
||||
---tokens---
|
||||
'*no' Text
|
||||
' ' Text
|
||||
'italics_' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'_no' Text
|
||||
' ' Text
|
||||
'italics*' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text
|
||||
|
||||
'**no italics**' Generic.Strong
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text
|
||||
|
||||
'__no italics__' Generic.Strong
|
||||
'\n' Text.Whitespace
|
21
spec/unsupported_lexers/md/test_italics_and_bold.txt
Normal file
21
spec/unsupported_lexers/md/test_italics_and_bold.txt
Normal file
@ -0,0 +1,21 @@
|
||||
---input---
|
||||
**bold** and *italics*
|
||||
|
||||
*italics* and **bold**
|
||||
|
||||
---tokens---
|
||||
'**bold**' Generic.Strong
|
||||
' ' Text
|
||||
'and' Text
|
||||
' ' Text
|
||||
'*italics*' Generic.Emph
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text
|
||||
|
||||
'*italics*' Generic.Emph
|
||||
' ' Text
|
||||
'and' Text
|
||||
' ' Text
|
||||
'**bold**' Generic.Strong
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
*italics*
|
||||
|
||||
(*italics*)
|
||||
|
||||
---tokens---
|
||||
'*italics*' Generic.Emph
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'(' Text
|
||||
'*italics*' Generic.Emph
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
_italics_
|
||||
|
||||
(_italics_)
|
||||
|
||||
---tokens---
|
||||
'_italics_' Generic.Emph
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'(' Text
|
||||
'_italics_' Generic.Emph
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
10
spec/unsupported_lexers/md/test_italics_no_multiline.txt
Normal file
10
spec/unsupported_lexers/md/test_italics_no_multiline.txt
Normal file
@ -0,0 +1,10 @@
|
||||
---input---
|
||||
*no
|
||||
italics*
|
||||
|
||||
---tokens---
|
||||
'*no' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'italics*' Text
|
||||
'\n' Text.Whitespace
|
23
spec/unsupported_lexers/md/test_links.txt
Normal file
23
spec/unsupported_lexers/md/test_links.txt
Normal file
@ -0,0 +1,23 @@
|
||||
---input---
|
||||
[text](link)
|
||||
|
||||

|
||||
|
||||
---tokens---
|
||||
'[' Text
|
||||
'text' Name.Tag
|
||||
']' Text
|
||||
'(' Text
|
||||
'link' Name.Attribute
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'![' Text
|
||||
'Image of foo' Name.Tag
|
||||
']' Text
|
||||
'(' Text
|
||||
'https://bar.baz' Name.Attribute
|
||||
')' Text
|
||||
'\n' Text.Whitespace
|
10
spec/unsupported_lexers/md/test_mentions.txt
Normal file
10
spec/unsupported_lexers/md/test_mentions.txt
Normal file
@ -0,0 +1,10 @@
|
||||
---input---
|
||||
note for @me:
|
||||
|
||||
---tokens---
|
||||
'note' Text
|
||||
' ' Text
|
||||
'for' Text
|
||||
' ' Text
|
||||
'@me:' Name.Entity
|
||||
'\n' Text.Whitespace
|
14
spec/unsupported_lexers/md/test_numbered_list.txt
Normal file
14
spec/unsupported_lexers/md/test_numbered_list.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
1. foo
|
||||
2. bar
|
||||
|
||||
---tokens---
|
||||
'1.' Keyword
|
||||
' ' Text
|
||||
'foo' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'2.' Keyword
|
||||
' ' Text
|
||||
'bar' Text
|
||||
'\n' Text.Whitespace
|
10
spec/unsupported_lexers/md/test_quote.txt
Normal file
10
spec/unsupported_lexers/md/test_quote.txt
Normal file
@ -0,0 +1,10 @@
|
||||
---input---
|
||||
> a
|
||||
> quote
|
||||
|
||||
---tokens---
|
||||
'> ' Keyword
|
||||
'a\n' Generic.Emph
|
||||
|
||||
'> ' Keyword
|
||||
'quote\n' Generic.Emph
|
18
spec/unsupported_lexers/md/test_reference_style_links.txt
Normal file
18
spec/unsupported_lexers/md/test_reference_style_links.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
[an example][id]
|
||||
[id]: http://example.com
|
||||
|
||||
---tokens---
|
||||
'[' Text
|
||||
'an example' Name.Tag
|
||||
']' Text
|
||||
'[' Text
|
||||
'id' Name.Label
|
||||
']' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'[' Text
|
||||
'id' Name.Label
|
||||
']: ' Text
|
||||
'http://example.com' Name.Attribute
|
||||
'\n' Text.Whitespace
|
9
spec/unsupported_lexers/md/test_strikethrough.txt
Normal file
9
spec/unsupported_lexers/md/test_strikethrough.txt
Normal file
@ -0,0 +1,9 @@
|
||||
---input---
|
||||
~~striked~~not striked
|
||||
|
||||
---tokens---
|
||||
'~~striked~~' Generic.Deleted
|
||||
'not' Text
|
||||
' ' Text
|
||||
'striked' Text
|
||||
'\n' Text.Whitespace
|
34
spec/unsupported_lexers/md/test_task_list.txt
Normal file
34
spec/unsupported_lexers/md/test_task_list.txt
Normal file
@ -0,0 +1,34 @@
|
||||
---input---
|
||||
- [ ] sample task
|
||||
|
||||
* [ ] sample task
|
||||
|
||||
* [ ] sample task
|
||||
|
||||
---tokens---
|
||||
'- ' Keyword
|
||||
'[ ]' Keyword
|
||||
' ' Text
|
||||
'sample' Text
|
||||
' ' Text
|
||||
'task' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'* ' Keyword
|
||||
'[ ]' Keyword
|
||||
' ' Text
|
||||
'sample' Text
|
||||
' ' Text
|
||||
'task' Text
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n ' Text.Whitespace
|
||||
'* ' Keyword
|
||||
'[ ]' Keyword
|
||||
' ' Text
|
||||
'sample' Text
|
||||
' ' Text
|
||||
'task' Text
|
||||
'\n' Text.Whitespace
|
10
spec/unsupported_lexers/md/test_topics.txt
Normal file
10
spec/unsupported_lexers/md/test_topics.txt
Normal file
@ -0,0 +1,10 @@
|
||||
---input---
|
||||
message to #you:
|
||||
|
||||
---tokens---
|
||||
'message' Text
|
||||
' ' Text
|
||||
'to' Text
|
||||
' ' Text
|
||||
'#you:' Name.Entity
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user