kdesc --coverage <target>: one target's view (from dev 931ea5490a5d)

For the designer building a target: the klammers that cover it, those
that do so with an empty definition (a decision that the klammer has no
meaning there), and the undecided ones (no definition). One klammer per
line, alphabetical; "all" adds the explanations; an unknown word names
the missing target.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
ackandClaude Fable 5.1 committed 2026-09-26 23:00:57 +02:00
1 parent 39edac9c94
commit d14da90bbf
6 files changed
+152 -15

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
# Fixture for kdesc_test.sh: one target's view (--coverage <target>).
# Engine tier: it declares its own targets, so the suite runs with no
# klammer set.
@@@target ta | Target A @@@
@@@target tb | Target B @@@
# Covers ta with a body.
@@full.k s : defined for ta @@
@@full.ta :: A*s* @@
# Covers ta with an EMPTY body: a decision that it has no meaning in ta.
@@nothing.k s : defined for ta by an empty body @@
@@nothing.ta :: @@
# Defined for tb only: undecided in ta.
@@elsewhere.k s : defined for tb @@
@@elsewhere.tb :: B*s* @@
+20 -1
View File
@@ -163,7 +163,26 @@ echo
echo "-- the subcommand words --"
shows "24. --coverage help explains" 'Coverage commands' "$KDESC" --coverage help
shows "25. --katoms help explains" 'Katom commands' "$KDESC" --katoms help
shows "26. an unknown coverage word" 'Unrecognized coverage command' "$KDESC" --coverage nonsense
# Since 2026-09-26 a word after --coverage is a TARGET name, checked once the
# klammersets are loaded, so an unknown word is answered as a missing target.
shows "26. an unknown coverage word" 'No target "nonsense" is defined' "$KDESC" --coverage nonsense
# --coverage <target> (2026-09-26): one target's view -- covered, covered by
# an EMPTY definition (a decision), undecided (no definition, nothing decided).
shows "26a. --coverage <target> is that target's view" \
'Klammer coverage of target "ta"' "$KDESC" --klammersets none -i "$DIR/target_view.k" --coverage ta
shows "26b. ... counting the empty definition apart" \
'3 klammers: 2 covered \(1 by an empty definition\), 1 undecided' "$KDESC" --klammersets none -i "$DIR/target_view.k" --coverage ta
shows "26c. ... the empty one under its own heading" \
'^ @nothing$' "$KDESC" --klammersets none -i "$DIR/target_view.k" --coverage ta
shows "26d. ... the undefined one as undecided" \
'^ @elsewhere$' "$KDESC" --klammersets none -i "$DIR/target_view.k" --coverage ta
shows "26e. ... \"all\" adds the explanation" \
'decision, not a gap' "$KDESC" --klammersets none -i "$DIR/target_view.k" --coverage ta all
shows "26f. a target that is not defined is named" \
'No target "tz" is defined' "$KDESC" --klammersets none -i "$DIR/target_view.k" --coverage tz
shows "26g. two target words are one too many" \
'Unrecognized coverage command' "$KDESC" --klammersets none -i "$DIR/target_view.k" --coverage ta tb
shows "27. an unknown katom word" 'Unrecognized katom command' "$KDESC" --katoms nonsense
# The help text and the error must name the flag by its CURRENT spelling:
# both still said --font for three weeks after the 2026-08-25 rename, and # retired-ok