aboutsummaryrefslogtreecommitdiff
path: root/test/cli.t
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-18 13:59:26 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-18 13:59:26 +0200
commit266b10d6cd2d44b4bccc36318054408ded80b8ce (patch)
treefa7e5bdd618902fd1bcfc34318395a181f531254 /test/cli.t
parent150f8c550d2f9ebbac61d195eb342eb2b2ec6b95 (diff)
parent36daf47dde9b0c16dacef31163ea74effdd5e7f3 (diff)
downloadcolitur-266b10d6cd2d44b4bccc36318054408ded80b8ce.tar.gz
colitur-266b10d6cd2d44b4bccc36318054408ded80b8ce.zip
merge: a flat INI overlay front end
A convenience format for simple local calendars, transpiled to the existing S-expression form and verified against it before emitting.
Diffstat (limited to 'test/cli.t')
-rw-r--r--test/cli.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/cli.t b/test/cli.t
index d735e69..d981d88 100644
--- a/test/cli.t
+++ b/test/cli.t
@@ -373,3 +373,22 @@ to empty and to the overlay's own id:
tiny.sexp: ok -- overlay tiny, 1 directive(s): 1 add, 0 suppress, 0 replace, 0 edit
every directive found its target
add tiny-feast
+
+`convert` turns the flat INI form into the S-expression one and verifies its
+own output before emitting it. The full pipeline, INI to a resolved day:
+
+ $ printf '[overlay]\nid = my-parish\n[our-patron]\ndate = 07-11\nrank = class-3\ncolour = white\nname.en = St Example\n' > p.ini
+ $ colitur convert p.ini > p.sexp
+ $ colitur check p.sexp
+ p.sexp: ok -- overlay my-parish, 1 directive(s): 1 add, 0 suppress, 0 replace, 0 edit
+ every directive found its target
+ add our-patron
+ $ colitur day 2026 --overlay p.sexp | grep '^2026-07-11'
+ 2026-07-11 saturday time-after-pentecost 6 our-patron class-3 white +pius-i
+
+What the INI form cannot express is refused by name, not dropped silently:
+
+ $ printf '[overlay]\nid = x\n[y]\nreplace = yes\n' > r.ini
+ $ colitur convert r.ini
+ colitur: r.ini: section [y]: replace is not expressible in the INI form -- it needs a whole entry, which is what the S-expression form is for (see colitur-overlay(5)). Suppress plus a fresh section is usually what you want instead.
+ [2]