Width and height argtypes, kdesc --argtypes from ref/, txt @define/@left_right/@columns, kdiag --check value validation (from dev d6993110e9b3)

Also: the klammertext argtype (descriptions kept as source), txt table
wrapping and :hpos/:offset, @c between ‹ ›, txt section headings, the
ktext newline-only trim, capitalize(), and the argtype test suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
ackandClaude Fable 5.1 committed 2026-09-16 16:59:49 +02:00
1 parent 9b0d0d7897
commit 0ead40f272
39 files changed
+734 -158

No files matched your search

+22
View File
@@ -209,6 +209,28 @@ check_clean "17. a correct document checks clean" \
check_clean "18. the Standard Klammer Set checks clean" \
"@read $K/sks/sks.k @"
# Argument VALUES are checked against their argument types (2026-09-16):
# the same test the engine applies at application time, run here on every
# value that is LITERAL -- nothing but text -- so a height unit on a width,
# or a word where a number is wanted, is found without rendering. A value
# holding a nested klammer, a *variable*, or a caret form is computed at run
# time and is skipped: check what is fixed, not what is computed.
W='@@@target tt | T @@@ @@@argtype em | a length in em :pattern \d+em @@@ @@f.k x.em :opt.em : F @@ @@f.tt :: [*x*] @@'
check_finds "19. a literal positional value that fails its argument type" \
'does not match the "em" argument type' "$W @f 3px @"
check_finds "20. ... and the argtype description is quoted" \
'a length in em' "$W @f 3px @"
check_clean "21. a literal value that matches is clean" "$W @f 3em @"
check_finds "22. a literal option value that fails its argument type" \
'does not match the "em" argument type' "$W @f 3em :opt 4 @"
check_clean "23. an option written alone is not a value to check" "$W @f 3em :opt @"
check_clean "24. a value holding a nested klammer is computed: skipped" \
"$W @@n : 3em @@ @f @n@ @"
check_clean "25. a value holding a *variable* in a body is computed: skipped" \
"$W @@g.k v : G @@ @@g.tt :: @f *v* @ @@"
check_clean "26. a value with a caret form is computed: skipped" \
"$W @f 3^:em @"
echo
echo "============================="
echo "Results: ${green}$PASS passed${reset}, ${red}$FAIL failed${reset}"