Reorganize tests into a real spec suite

This commit is contained in:
2024-08-04 19:18:43 -03:00
parent 57c160173c
commit e7c2053222
693 changed files with 136 additions and 116 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,10 @@
---input---
*no
italics*
---tokens---
'*no' Text
'\n' Text.Whitespace
'italics*' Text
'\n' Text.Whitespace

View File

@ -0,0 +1,23 @@
---input---
[text](link)
![Image of foo](https://bar.baz)
---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

View File

@ -0,0 +1,10 @@
---input---
note for @me:
---tokens---
'note' Text
' ' Text
'for' Text
' ' Text
'@me:' Name.Entity
'\n' Text.Whitespace

View 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

View File

@ -0,0 +1,10 @@
---input---
> a
> quote
---tokens---
'> ' Keyword
'a\n' Generic.Emph
'> ' Keyword
'quote\n' Generic.Emph

View 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

View File

@ -0,0 +1,9 @@
---input---
~~striked~~not striked
---tokens---
'~~striked~~' Generic.Deleted
'not' Text
' ' Text
'striked' Text
'\n' Text.Whitespace

View 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

View File

@ -0,0 +1,10 @@
---input---
message to #you:
---tokens---
'message' Text
' ' Text
'to' Text
' ' Text
'#you:' Name.Entity
'\n' Text.Whitespace