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,11 @@
# Float value `1.1` should be explicitly highlighted
---input---
yang-version 1.1;
---tokens---
'yang-version' Keyword
' ' Text.Whitespace
'1.1' Literal.Number.Float
';' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
# Integer value `5` should be explicitly highlighted
---input---
value 5;
---tokens---
'value' Keyword
' ' Text.Whitespace
'5' Literal.Number.Integer
';' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
# Namespace `urn:test:std:yang` should not be explicitly highlighted
---input---
namespace urn:test:std:yang;
---tokens---
'namespace' Keyword
' ' Text.Whitespace
'urn:test:std:yang' Name.Variable
';' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,13 @@
# namespace-prefix `yang` should be explicitly highlighted
---input---
type yang:counter64;
---tokens---
'type' Keyword
' ' Text.Whitespace
'yang' Name.Namespace
':' Punctuation
'counter64' Name.Variable
';' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
# Revision-date `2020-08-03` should be explicitly highlighted
---input---
revision 2020-03-08{
---tokens---
'revision' Keyword
' ' Text.Whitespace
'2020-03-08' Name.Label
'{' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
# String value `"5"` should be not explicitly highlighted
---input---
value "5";
---tokens---
'value' Keyword
' ' Text.Whitespace
'"5"' Literal.String.Double
';' Punctuation
'\n' Text.Whitespace