diff options
-rw-r--r-- | tests/README.md | 0 | ||||
-rw-r--r-- | tests/parsing/README.md | 8 | ||||
-rw-r--r-- | tests/parsing/spec_example.flat.pom | 10 | ||||
-rw-r--r-- | tests/parsing/spec_example.pom | 20 |
4 files changed, 38 insertions, 0 deletions
diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/README.md diff --git a/tests/parsing/README.md b/tests/parsing/README.md new file mode 100644 index 0000000..d3389cf --- /dev/null +++ b/tests/parsing/README.md @@ -0,0 +1,8 @@ +# Parsing tests + +These tests only check that key-value pairs are parsed correctly. +They do not test merging, number/list parsing, or schema validation. + +Each test `x` consists of two files, `x.pom` and `x.flat.pom`. These +files should produce the exact same schema, but `x.flat.pom` is formatted +in a simple way without any section headers, and only using doubly-quoted single-line strings. diff --git a/tests/parsing/spec_example.flat.pom b/tests/parsing/spec_example.flat.pom new file mode 100644 index 0000000..6aaa0de --- /dev/null +++ b/tests/parsing/spec_example.flat.pom @@ -0,0 +1,10 @@ +title = "'Crème brûlée'" +0-*/_description_/*-0 = "A 'beautiful' crème brûlée recipe\nthat's sure to delight your friends!" +author = "= `Jean\\0\\\\\"P.\" D'Martingale" +ingredients.flour.quantity = "100 g" +ingredients.flour.type = "all-purpose" +ingredients.sugar.quantity = "50 g" +ingredients.sugar.type = "brown" +ingrédients.œufs.quantité = "3" +ingrédients.œufs.type = "extra large\\,farm fresh\\,free-range" +DIRECTIONS.en_CA.version.5 = "\n1. Separate the egg yolks from the \"whites\".\n2. Mix the yolks in a bowl with the sugar.\n…\n59. Enjoy!\n" diff --git a/tests/parsing/spec_example.pom b/tests/parsing/spec_example.pom new file mode 100644 index 0000000..739cef4 --- /dev/null +++ b/tests/parsing/spec_example.pom @@ -0,0 +1,20 @@ +title = 'Crème brûlée' +0-*/_description_/*-0 =`A 'beautiful' crème br\u{FB}l\u{0000e9}e recipe +that\'s sure to delight your friends!` +author == `Jean\0\\"P." D'Martingale +[ingredients.flour] + quantity= "100 g" + type="all-purpose" +[ingredients.sugar] + quantity = 50 g + type = "br\x6f\u{77}n" +[ingrédients] + œufs.quantité=3 + œufs.type = "extra large\,farm fresh\\,free-range" +[] +DIRECTIONS.en_CA.version.5 = " +1. Separate the egg yolks from the \"whites\". +2. Mix the yolks in a bowl with the sugar. +… +59. Enjoy! +" |