85e8342a74
Every script gets a complete spec.md sectionized like SPEC.md (python/src/<name>/spec.md, <name>.spec.md for shell scripts). Change order becomes spec -> tests -> code. Specs added for gpgtools, hello, hello_bash; CHANGELOG under Unreleased. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
1.2 KiB
1.2 KiB
hello_bash specification
Complete description of bash/hello_bash.sh. The sample bash
script of the template: it exercises the SPEC item 6.10 shared
interface end to end. Items are cited as hello_bash spec item N.M.
1. Purpose
- 1.1 Print one hello line per name argument, defaulting to
worldwhen no argument is given, and exit via the interface:hello, <name> (from daedalus bash).
2. Behavior
- 2.1 The script sources
daedalus_common.shonce, defineshelp()(usage text) andmain()(the printing), and ends withdaedalus_bash_dispatch "$@"(SPEC item 6.10). - 2.2
daedalus hello_bash meprintshello, me (from daedalus bash);daedalus hello_bash a bprints one line per name; no arguments prints the line forworld. - 2.3
help,-h, and--helproute tohelp()and exit 0; every other invocation routes tomainunchanged. - 2.4 Nothing is read or written; the script takes names only.
3. Testing approach
- 3.1
bash/tests/test_hello_bash.pyruns the script throughrunners.find_bash()(skip when bash is missing) and covers the default name, multiple names, the help routing, and the completion words.