diff --git a/tests/languages/yaml/boolean_feature.test b/tests/languages/yaml/boolean_feature.test new file mode 100644 index 0000000000..ebf36dbd64 --- /dev/null +++ b/tests/languages/yaml/boolean_feature.test @@ -0,0 +1,17 @@ +--- +foo: true +bar: false + +---------------------------------------------------- + +[ + ["punctuation", "---"], + ["key", "foo"], ["punctuation", ":"], + ["boolean", "true"], + ["key", "bar"], ["punctuation", ":"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/tests/languages/yaml/comment_feature.test b/tests/languages/yaml/comment_feature.test new file mode 100644 index 0000000000..054d6023d1 --- /dev/null +++ b/tests/languages/yaml/comment_feature.test @@ -0,0 +1,13 @@ +# +# foobar + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/yaml/datetime_feature.test b/tests/languages/yaml/datetime_feature.test new file mode 100644 index 0000000000..645680d9f6 --- /dev/null +++ b/tests/languages/yaml/datetime_feature.test @@ -0,0 +1,31 @@ +--- +canonical: 2001-12-15T02:59:43.1Z +iso8601: 2001-12-14t21:59:43.10-05:00 +spaced: 2001-12-14 21:59:43.10 -5 +date: 2002-12-14 +times: + - 10:53 + - 10:53:20.53 + +---------------------------------------------------- + +[ + ["punctuation", "---"], + ["key", "canonical"], ["punctuation", ":"], + ["datetime", "2001-12-15T02:59:43.1Z"], + ["key", "iso8601"], ["punctuation", ":"], + ["datetime", "2001-12-14t21:59:43.10-05:00"], + ["key", "spaced"], ["punctuation", ":"], + ["datetime", "2001-12-14 21:59:43.10 -5"], + ["key", "date"], ["punctuation", ":"], + ["datetime", "2002-12-14"], + ["key", "times"], ["punctuation", ":"], + ["punctuation", "-"], + ["datetime", "10:53"], + ["punctuation", "-"], + ["datetime", "10:53:20.53"] +] + +---------------------------------------------------- + +Checks for dates, times and datetimes. \ No newline at end of file diff --git a/tests/languages/yaml/directive_feature.test b/tests/languages/yaml/directive_feature.test new file mode 100644 index 0000000000..703e8bed58 --- /dev/null +++ b/tests/languages/yaml/directive_feature.test @@ -0,0 +1,13 @@ +%YAML 1.2 +%TAG + +---------------------------------------------------- + +[ + ["directive", "%YAML 1.2"], + ["directive", "%TAG"] +] + +---------------------------------------------------- + +Checks for directives. \ No newline at end of file diff --git a/tests/languages/yaml/important_feature.test b/tests/languages/yaml/important_feature.test new file mode 100644 index 0000000000..bf4aea8410 --- /dev/null +++ b/tests/languages/yaml/important_feature.test @@ -0,0 +1,19 @@ +&B1 +&A +*A +&SS +*SS + +---------------------------------------------------- + +[ + ["important", "&B1"], + ["important", "&A"], + ["important", "*A"], + ["important", "&SS"], + ["important", "*SS"] +] + +---------------------------------------------------- + +Checks for important. \ No newline at end of file diff --git a/tests/languages/yaml/key_feature.test b/tests/languages/yaml/key_feature.test new file mode 100644 index 0000000000..98359b22e9 --- /dev/null +++ b/tests/languages/yaml/key_feature.test @@ -0,0 +1,15 @@ +--- +foo: 4 +FooBar : 5 + +---------------------------------------------------- + +[ + ["punctuation", "---"], + ["key", "foo"], ["punctuation", ":"], ["number", "4"], + ["key", "FooBar"], ["punctuation", ":"], ["number", "5"] +] + +---------------------------------------------------- + +Checks for keys. \ No newline at end of file diff --git a/tests/languages/yaml/null_feature.test b/tests/languages/yaml/null_feature.test new file mode 100644 index 0000000000..ca12f23078 --- /dev/null +++ b/tests/languages/yaml/null_feature.test @@ -0,0 +1,17 @@ +--- +foo: null +bar: ~ + +---------------------------------------------------- + +[ + ["punctuation", "---"], + ["key", "foo"], ["punctuation", ":"], + ["null", "null"], + ["key", "bar"], ["punctuation", ":"], + ["null", "~"] +] + +---------------------------------------------------- + +Checks for null and ~. \ No newline at end of file diff --git a/tests/languages/yaml/number_feature.test b/tests/languages/yaml/number_feature.test new file mode 100644 index 0000000000..409163f108 --- /dev/null +++ b/tests/languages/yaml/number_feature.test @@ -0,0 +1,38 @@ +--- +foo: 0xBadFace +bar: 0o754 +baz: 42 +foo: 3.14159 +bar: 4e8 +baz: 3.1E-7 +foo: 0.4e+2 +bar: -0xFF +baz: +0o123 + +---------------------------------------------------- + +[ + ["punctuation", "---"], + ["key", "foo"], ["punctuation", ":"], + ["number", "0xBadFace"], + ["key", "bar"], ["punctuation", ":"], + ["number", "0o754"], + ["key", "baz"], ["punctuation", ":"], + ["number", "42"], + ["key", "foo"], ["punctuation", ":"], + ["number", "3.14159"], + ["key", "bar"], ["punctuation", ":"], + ["number", "4e8"], + ["key", "baz"], ["punctuation", ":"], + ["number", "3.1E-7"], + ["key", "foo"], ["punctuation", ":"], + ["number", "0.4e+2"], + ["key", "bar"], ["punctuation", ":"], + ["number", "-0xFF"], + ["key", "baz"], ["punctuation", ":"], + ["number", "+0o123"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/tests/languages/yaml/scalar_feature.test b/tests/languages/yaml/scalar_feature.test new file mode 100644 index 0000000000..02a3c99d48 --- /dev/null +++ b/tests/languages/yaml/scalar_feature.test @@ -0,0 +1,23 @@ +--- +foo: > + Foo bar + baz +bar: | + Foo bar + baz + +---------------------------------------------------- + +[ + ["punctuation", "---"], + ["key", "foo"], ["punctuation", ":"], + ["punctuation", ">"], + ["scalar", "\r\n\tFoo bar\r\n\tbaz"], + ["key", "bar"], ["punctuation", ":"], + ["punctuation", "|"], + ["scalar", "\r\n\tFoo bar\r\n\tbaz"] +] + +---------------------------------------------------- + +Checks for scalars. \ No newline at end of file diff --git a/tests/languages/yaml/string_feature.test b/tests/languages/yaml/string_feature.test new file mode 100644 index 0000000000..0b9dcadd4b --- /dev/null +++ b/tests/languages/yaml/string_feature.test @@ -0,0 +1,23 @@ +--- +foo: "" +bar: "fo\"obar" +foo: '' +bar: 'fo\'obar' + +---------------------------------------------------- + +[ + ["punctuation", "---"], + ["key", "foo"], ["punctuation", ":"], + ["string", "\"\""], + ["key", "bar"], ["punctuation", ":"], + ["string", "\"fo\\\"obar\""], + ["key", "foo"], ["punctuation", ":"], + ["string", "''"], + ["key", "bar"], ["punctuation", ":"], + ["string", "'fo\\'obar'"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/tests/languages/yaml/tag_feature.test b/tests/languages/yaml/tag_feature.test new file mode 100644 index 0000000000..8924b3a2d1 --- /dev/null +++ b/tests/languages/yaml/tag_feature.test @@ -0,0 +1,15 @@ +!!map +!!str +!!seq + +---------------------------------------------------- + +[ + ["tag", "!!map"], + ["tag", "!!str"], + ["tag", "!!seq"] +] + +---------------------------------------------------- + +Checks for tags \ No newline at end of file