diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
commit | 1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch) | |
tree | 0299c6dd11d5edfa918a29b6456bc1875f1d288c /tests/snippets/yaml | |
parent | Initial commit. (diff) | |
download | pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.tar.xz pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.zip |
Adding upstream version 2.14.0+dfsg.upstream/2.14.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/snippets/yaml')
-rw-r--r-- | tests/snippets/yaml/test_yaml.txt | 13 | ||||
-rw-r--r-- | tests/snippets/yaml/test_yaml_colon_in_key.txt | 11 | ||||
-rw-r--r-- | tests/snippets/yaml/test_yaml_colon_in_key_double.txt | 11 | ||||
-rw-r--r-- | tests/snippets/yaml/test_yaml_colon_in_key_start.txt | 11 |
4 files changed, 46 insertions, 0 deletions
diff --git a/tests/snippets/yaml/test_yaml.txt b/tests/snippets/yaml/test_yaml.txt new file mode 100644 index 0000000..0dd3911 --- /dev/null +++ b/tests/snippets/yaml/test_yaml.txt @@ -0,0 +1,13 @@ +# Bug #1528: This previously parsed 'token # innocent' as a tag + +---input--- +here: token # innocent: comment + +---tokens--- +'here' Name.Tag +':' Punctuation +' ' Text.Whitespace +'token' Literal.Scalar.Plain +' ' Text.Whitespace +'# innocent: comment' Comment.Single +'\n' Text.Whitespace diff --git a/tests/snippets/yaml/test_yaml_colon_in_key.txt b/tests/snippets/yaml/test_yaml_colon_in_key.txt new file mode 100644 index 0000000..9f3d313 --- /dev/null +++ b/tests/snippets/yaml/test_yaml_colon_in_key.txt @@ -0,0 +1,11 @@ +# Colon in the key name is accepted by the YAML specs too + +---input--- +foo:bar: value + +---tokens--- +'foo:bar' Name.Tag +':' Punctuation +' ' Text.Whitespace +'value' Literal.Scalar.Plain +'\n' Text.Whitespace diff --git a/tests/snippets/yaml/test_yaml_colon_in_key_double.txt b/tests/snippets/yaml/test_yaml_colon_in_key_double.txt new file mode 100644 index 0000000..6f68b6d --- /dev/null +++ b/tests/snippets/yaml/test_yaml_colon_in_key_double.txt @@ -0,0 +1,11 @@ +# Colons in the key name is accepted by the YAML specs too + +---input--- +foo::bar: value + +---tokens--- +'foo::bar' Name.Tag +':' Punctuation +' ' Text.Whitespace +'value' Literal.Scalar.Plain +'\n' Text.Whitespace diff --git a/tests/snippets/yaml/test_yaml_colon_in_key_start.txt b/tests/snippets/yaml/test_yaml_colon_in_key_start.txt new file mode 100644 index 0000000..60d4e23 --- /dev/null +++ b/tests/snippets/yaml/test_yaml_colon_in_key_start.txt @@ -0,0 +1,11 @@ +# Colon at the beginning of the key name is accepted by the YAML specs too + +---input--- +:foo: value + +---tokens--- +':foo' Name.Tag +':' Punctuation +' ' Text.Whitespace +'value' Literal.Scalar.Plain +'\n' Text.Whitespace |