aboutsummaryrefslogtreecommitdiff
path: root/internal/ini/ini_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ini/ini_test.go')
-rw-r--r--internal/ini/ini_test.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/ini/ini_test.go b/internal/ini/ini_test.go
index d454388..16aef7b 100644
--- a/internal/ini/ini_test.go
+++ b/internal/ini/ini_test.go
@@ -4,13 +4,15 @@ import "testing"
func TestParseSectionsAndPairs(t *testing.T) {
in := []byte(`
-# a comment
-lectionary = new ; trailing comment
+# a full-line comment
+; another full-line comment
+lectionary = new
[assumption]
date = 08-15
-name.pl = Wniebowzięcie ; unicode ok
+name.pl = Wniebowzięcie
rank= solemnity
+reading.first = Rev 11:19; 12:1-6.10
[assumption/vigil]
reading.gospel = Łk 11,27-28
@@ -29,6 +31,11 @@ reading.gospel = Łk 11,27-28
if secs[1].Pairs[2] != (Pair{"rank", "solemnity"}) {
t.Fatalf("no-space key = %+v", secs[1].Pairs[2])
}
+ // a semicolon inside a value (scripture citation) is preserved, not treated
+ // as a comment.
+ if got := secs[1].Pairs[3]; got != (Pair{"reading.first", "Rev 11:19; 12:1-6.10"}) {
+ t.Fatalf("citation with ';' mangled: %+v", got)
+ }
if secs[2].Name != "assumption/vigil" {
t.Fatalf("subsection = %q", secs[2].Name)
}