-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for issue with new YAML grammar (#228265)
Part of #224862
- Loading branch information
Showing
2 changed files
with
319 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
extensions/vscode-colorize-tests/test/colorize-fixtures/issue-224862.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
foo: 1 | ||
--- | ||
|
||
This is highlighted as a YAML string | ||
|
||
# This is highlighted as a YAML comment | ||
|
||
This is highlighted as a YAML error |
310 changes: 310 additions & 0 deletions
310
extensions/vscode-colorize-tests/test/colorize-results/issue-224862_yaml.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,310 @@ | ||
[ | ||
{ | ||
"c": "---", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml entity.other.document.begin.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "foo", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml meta.mapping.yaml meta.map.key.yaml string.unquoted.plain.yaml entity.name.tag.yaml", | ||
"r": { | ||
"dark_plus": "entity.name.tag: #569CD6", | ||
"light_plus": "entity.name.tag: #800000", | ||
"dark_vs": "entity.name.tag: #569CD6", | ||
"light_vs": "entity.name.tag: #800000", | ||
"hc_black": "entity.name.tag: #569CD6", | ||
"dark_modern": "entity.name.tag: #569CD6", | ||
"hc_light": "entity.name.tag: #0F4A85", | ||
"light_modern": "entity.name.tag: #800000" | ||
} | ||
}, | ||
{ | ||
"c": ":", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml meta.mapping.yaml meta.map.value.yaml punctuation.separator.map.value.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": " ", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml meta.mapping.yaml meta.map.value.yaml punctuation.whitespace.separator.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "1", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml meta.mapping.yaml meta.map.value.yaml string.unquoted.plain.out.yaml constant.numeric.integer.decimal.yaml", | ||
"r": { | ||
"dark_plus": "constant.numeric: #B5CEA8", | ||
"light_plus": "constant.numeric: #098658", | ||
"dark_vs": "constant.numeric: #B5CEA8", | ||
"light_vs": "constant.numeric: #098658", | ||
"hc_black": "constant.numeric: #B5CEA8", | ||
"dark_modern": "constant.numeric: #B5CEA8", | ||
"hc_light": "constant.numeric: #096D48", | ||
"light_modern": "constant.numeric: #098658" | ||
} | ||
}, | ||
{ | ||
"c": "---", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml entity.other.document.begin.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "This is highlighted as a YAML string", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml string.unquoted.plain.out.yaml", | ||
"r": { | ||
"dark_plus": "string: #CE9178", | ||
"light_plus": "string.unquoted.plain.out.yaml: #0000FF", | ||
"dark_vs": "string: #CE9178", | ||
"light_vs": "string.unquoted.plain.out.yaml: #0000FF", | ||
"hc_black": "string: #CE9178", | ||
"dark_modern": "string: #CE9178", | ||
"hc_light": "string.unquoted.plain.out.yaml: #0F4A85", | ||
"light_modern": "string.unquoted.plain.out.yaml: #0000FF" | ||
} | ||
}, | ||
{ | ||
"c": "#", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml comment.line.number-sign.yaml punctuation.definition.comment.yaml", | ||
"r": { | ||
"dark_plus": "comment: #6A9955", | ||
"light_plus": "comment: #008000", | ||
"dark_vs": "comment: #6A9955", | ||
"light_vs": "comment: #008000", | ||
"hc_black": "comment: #7CA668", | ||
"dark_modern": "comment: #6A9955", | ||
"hc_light": "comment: #515151", | ||
"light_modern": "comment: #008000" | ||
} | ||
}, | ||
{ | ||
"c": " This is highlighted as a YAML comment", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml comment.line.number-sign.yaml", | ||
"r": { | ||
"dark_plus": "comment: #6A9955", | ||
"light_plus": "comment: #008000", | ||
"dark_vs": "comment: #6A9955", | ||
"light_vs": "comment: #008000", | ||
"hc_black": "comment: #7CA668", | ||
"dark_modern": "comment: #6A9955", | ||
"hc_light": "comment: #515151", | ||
"light_modern": "comment: #008000" | ||
} | ||
}, | ||
{ | ||
"c": "This", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml invalid.illegal.unrecognized.yaml", | ||
"r": { | ||
"dark_plus": "invalid: #F44747", | ||
"light_plus": "invalid: #CD3131", | ||
"dark_vs": "invalid: #F44747", | ||
"light_vs": "invalid: #CD3131", | ||
"hc_black": "invalid: #F44747", | ||
"dark_modern": "invalid: #F44747", | ||
"hc_light": "invalid: #B5200D", | ||
"light_modern": "invalid: #CD3131" | ||
} | ||
}, | ||
{ | ||
"c": " ", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml punctuation.whitespace.separator.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "is", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml invalid.illegal.unrecognized.yaml", | ||
"r": { | ||
"dark_plus": "invalid: #F44747", | ||
"light_plus": "invalid: #CD3131", | ||
"dark_vs": "invalid: #F44747", | ||
"light_vs": "invalid: #CD3131", | ||
"hc_black": "invalid: #F44747", | ||
"dark_modern": "invalid: #F44747", | ||
"hc_light": "invalid: #B5200D", | ||
"light_modern": "invalid: #CD3131" | ||
} | ||
}, | ||
{ | ||
"c": " ", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml punctuation.whitespace.separator.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "highlighted", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml invalid.illegal.unrecognized.yaml", | ||
"r": { | ||
"dark_plus": "invalid: #F44747", | ||
"light_plus": "invalid: #CD3131", | ||
"dark_vs": "invalid: #F44747", | ||
"light_vs": "invalid: #CD3131", | ||
"hc_black": "invalid: #F44747", | ||
"dark_modern": "invalid: #F44747", | ||
"hc_light": "invalid: #B5200D", | ||
"light_modern": "invalid: #CD3131" | ||
} | ||
}, | ||
{ | ||
"c": " ", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml punctuation.whitespace.separator.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "as", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml invalid.illegal.unrecognized.yaml", | ||
"r": { | ||
"dark_plus": "invalid: #F44747", | ||
"light_plus": "invalid: #CD3131", | ||
"dark_vs": "invalid: #F44747", | ||
"light_vs": "invalid: #CD3131", | ||
"hc_black": "invalid: #F44747", | ||
"dark_modern": "invalid: #F44747", | ||
"hc_light": "invalid: #B5200D", | ||
"light_modern": "invalid: #CD3131" | ||
} | ||
}, | ||
{ | ||
"c": " ", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml punctuation.whitespace.separator.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "a", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml invalid.illegal.unrecognized.yaml", | ||
"r": { | ||
"dark_plus": "invalid: #F44747", | ||
"light_plus": "invalid: #CD3131", | ||
"dark_vs": "invalid: #F44747", | ||
"light_vs": "invalid: #CD3131", | ||
"hc_black": "invalid: #F44747", | ||
"dark_modern": "invalid: #F44747", | ||
"hc_light": "invalid: #B5200D", | ||
"light_modern": "invalid: #CD3131" | ||
} | ||
}, | ||
{ | ||
"c": " ", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml punctuation.whitespace.separator.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "YAML", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml invalid.illegal.unrecognized.yaml", | ||
"r": { | ||
"dark_plus": "invalid: #F44747", | ||
"light_plus": "invalid: #CD3131", | ||
"dark_vs": "invalid: #F44747", | ||
"light_vs": "invalid: #CD3131", | ||
"hc_black": "invalid: #F44747", | ||
"dark_modern": "invalid: #F44747", | ||
"hc_light": "invalid: #B5200D", | ||
"light_modern": "invalid: #CD3131" | ||
} | ||
}, | ||
{ | ||
"c": " ", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml punctuation.whitespace.separator.yaml", | ||
"r": { | ||
"dark_plus": "default: #D4D4D4", | ||
"light_plus": "default: #000000", | ||
"dark_vs": "default: #D4D4D4", | ||
"light_vs": "default: #000000", | ||
"hc_black": "default: #FFFFFF", | ||
"dark_modern": "default: #CCCCCC", | ||
"hc_light": "default: #292929", | ||
"light_modern": "default: #3B3B3B" | ||
} | ||
}, | ||
{ | ||
"c": "error", | ||
"t": "source.yaml meta.stream.yaml meta.document.yaml invalid.illegal.unrecognized.yaml", | ||
"r": { | ||
"dark_plus": "invalid: #F44747", | ||
"light_plus": "invalid: #CD3131", | ||
"dark_vs": "invalid: #F44747", | ||
"light_vs": "invalid: #CD3131", | ||
"hc_black": "invalid: #F44747", | ||
"dark_modern": "invalid: #F44747", | ||
"hc_light": "invalid: #B5200D", | ||
"light_modern": "invalid: #CD3131" | ||
} | ||
} | ||
] |