summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-09 14:31:32 -0400
committerpommicket <pommicket@gmail.com>2025-09-09 14:31:32 -0400
commite33f6053d72711cf75c3b30c811fd2a99d6ca7d8 (patch)
tree7342822cf6bdba24627487cf622ca571528d67c9
parent8bb5b5f2ef8bb1c431953ed42735f8371b708abf (diff)
Add list test
-rw-r--r--tests/interpretation/README.md2
-rw-r--r--tests/interpretation/list.pom27
-rw-r--r--tests/parsing/escape_sequences.flat.pom1
-rw-r--r--tests/parsing/escape_sequences.pom1
4 files changed, 30 insertions, 1 deletions
diff --git a/tests/interpretation/README.md b/tests/interpretation/README.md
index b263e05..136142b 100644
--- a/tests/interpretation/README.md
+++ b/tests/interpretation/README.md
@@ -10,5 +10,5 @@ return an error.
`list.pom` — The keys in this file are in pairs `k.list` and `k.sep`.
`k.list` is a POM list, and `k.sep` is the concatenation of `x;` for each entry
-`x` in the list (none of the entries have `;` in them, so this representation is
+`x` in the list with no leading/trailing whitespace (none of the entries have `;` in them, so this representation is
unambiguous).
diff --git a/tests/interpretation/list.pom b/tests/interpretation/list.pom
new file mode 100644
index 0000000..f02fa23
--- /dev/null
+++ b/tests/interpretation/list.pom
@@ -0,0 +1,27 @@
+# examples from spec
+fonts.list = monospace, sans-serif, serif
+fonts.sep = monospace;sans-serif;serif;
+files.list = " foo.txt, weird\,name,z "
+files.sep = foo.txt;weird,name;z;
+things.list = \,,,76
+things.sep = ,;;76;
+empties.list = ,,,
+empties.sep = ;;;
+escapees.list = \\,\a,\,
+escapees.sep = \;\a;,;
+
+
+empty.list =
+empty.sep =
+a.list = a
+a.sep = a;
+ab.list = " a , b "
+ab.sep = a;b;
+1empty.list = ,
+1empty.sep = ;
+2empty.list = ,,
+2empty.sep = ;;
+comma.list = a\,b, c
+comma.sep = a,b;c;
+backslash.list = a\\\,b, c\\d
+backslash.sep = a\,b;c\d;
diff --git a/tests/parsing/escape_sequences.flat.pom b/tests/parsing/escape_sequences.flat.pom
index e124d91..2df0a4c 100644
--- a/tests/parsing/escape_sequences.flat.pom
+++ b/tests/parsing/escape_sequences.flat.pom
@@ -1,3 +1,4 @@
qvalue = "\x0a\x0d\x09\x5c\x22\x27\x60\\,\\☺☺☺\x60\x27"
bvalue = "\x0a\x0d\x09\x5c\x22\x27\x60\\,\\☺☺☺\x22\x27"
nvalue = "\\n\\r\\t\\u\\x\\,"
+unquoted_escape = "\\`foo\\`"
diff --git a/tests/parsing/escape_sequences.pom b/tests/parsing/escape_sequences.pom
index 959c97c..149fb69 100644
--- a/tests/parsing/escape_sequences.pom
+++ b/tests/parsing/escape_sequences.pom
@@ -1,3 +1,4 @@
qvalue = "\n\r\t\\\"\'\`\,\x5c\u{263a}\u{0263a}\u{00263A}`'"
bvalue = `\n\r\t\\\"\'\`\,\x5c\u{263a}\u{0263a}\u{00263A}"'`
nvalue = \n\r\t\u\x\,
+unquoted_escape = \`foo\`