From 6ae91130c7c2ff1c11ecfe5798d8037954a4d570 Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 23 Sep 2025 01:54:50 -0400 Subject: Stricter requirements about locations of sections --- site/spec.html | 7 +++++-- tests/location/sections.locations.pom | 17 +++++++++++------ tests/location/sections.pom | 8 ++++++++ 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 min Useful for reporting invalid values. If a key k isn’t given a value in the configuration, but a key of the form k.j is, then the - location of the definition of an arbitrary such key - should be considered the location of k. + location of the definition of the earliest such key + should be considered the location of k. 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.
  • get(conf: Configuration, key: String) -> Optional<String>
    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 -- cgit v1.2.3