diff options
Diffstat (limited to 'test/cli.t')
| -rw-r--r-- | test/cli.t | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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] |
