summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-23 01:54:50 -0400
committerpommicket <pommicket@gmail.com>2025-09-23 01:54:50 -0400
commit6ae91130c7c2ff1c11ecfe5798d8037954a4d570 (patch)
tree8b17b7bd02adc10c58737c96f422dddcc098a0a9
parent83ee81133b2c8a853330c8b683c391068ce36a97 (diff)
Stricter requirements about locations of sections
-rw-r--r--site/spec.html7
-rw-r--r--tests/location/sections.locations.pom17
-rw-r--r--tests/location/sections.pom8
3 files changed, 24 insertions, 8 deletions
diff --git a/site/spec.html b/site/spec.html
index 068d688..704395b 100644
--- a/site/spec.html
+++ b/site/spec.html
@@ -456,8 +456,11 @@ time = 35&nbsp;min
Useful for reporting invalid values.
If a key <i>k</i> isn’t given a value in the configuration, but a key of the form
<i>k</i><code>.</code><i>j</i> is, then the
- location of the definition of an arbitrary such key
- should be considered the location of <i>k</i>.
+ location of the definition of the earliest such key
+ should be considered the location of <i>k</i>. Here “earliest” means having
+ the least line number; when there are keys from multiple files to consider
+ (as may be the case in merged configurations),
+ which one is earliest is determined arbitrarily.
</li>
<li>
<code>get(conf: Configuration, key: String) -&gt; Optional&lt;String&gt;</code><br>
diff --git a/tests/location/sections.locations.pom b/tests/location/sections.locations.pom
index 7580028..5aff858 100644
--- a/tests/location/sections.locations.pom
+++ b/tests/location/sections.locations.pom
@@ -1,7 +1,12 @@
a = 2
-a.b = 2
-r = 5
-r.s = 5
-r.s.t = 5
-b = 8
-b.b = 8
+a.a = 2
+a.b = 3
+r = 6
+r.s = 6
+r.s.A = 6
+r.s.t = 7
+b = 10
+b.a = 11
+b.b = 10
+n = 16
+n.m = 14
diff --git a/tests/location/sections.pom b/tests/location/sections.pom
index 8c79cb2..13c1cd1 100644
--- a/tests/location/sections.pom
+++ b/tests/location/sections.pom
@@ -1,8 +1,16 @@
[a]
+a = 5
b = 12
[r.s]
+A = 9
t = 13
[b]
b = 14
+a = 0
+
+[n]
+m = 5
+[]
+n = 6