summaryrefslogtreecommitdiffhomepage
path: root/web/content/docs/develop.md
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-25 01:02:03 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-25 01:02:03 -0600
commit392381b2de8bce919735fce753b3740747f2b2fa (patch)
tree34aa3101df173cb647f9fab6d922186b86df8f0a /web/content/docs/develop.md
parentc7f23b8a5fb86f8df51809aca64415bcadcaa9f6 (diff)
downloadzash-feat/web-site.tar.gz
web: a Hugo site for zashfeat/web-site
A site in web/, built with Hugo and no theme module, so it builds offline from one Go binary: hugo server --source web preview on localhost:1313 hugo --source web --minify -> web/public, which is ignored Pages: a home page with the shell's pitch, a terminal card, the four properties that define it and a short benchmark table, plus three docs pages (building, development, status) in a section with a sidebar. The palette comes from packaging/zash-logo.svg: mainframe navy, periwinkle, a signal blue. Dark only, monospace where a shell would be monospaced. Highlighting uses classes (`markup.highlight.noClasses = false`) against assets/css/chroma.css generated with `hugo gen chromastyles --style= tokyonight-night`, so code sits in the page instead of a monokai box. site.css and copy.js go through Hugo's minify+fingerprint pipeline. Two .gitignore fixes this needed: `docs/` matched web/content/docs/ (the generated Doxygen output is at the root, so it is `/docs/` now), and Hugo's .hugo_build.lock is ignored. Not published yet: zash is private and Pages is not available for a private repository on a free plan, so web/README.md records the options.
Diffstat (limited to 'web/content/docs/develop.md')
-rw-r--r--web/content/docs/develop.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/web/content/docs/develop.md b/web/content/docs/develop.md
new file mode 100644
index 0000000..392987e
--- /dev/null
+++ b/web/content/docs/develop.md
@@ -0,0 +1,46 @@
+---
+weight: 20
+title: Development
+description: How zash is tested, benchmarked and kept warning-free.
+---
+
+
+zash is one C23 source directory with a flat `.POSIX` makefile, and the tests
+are shell scripts compared against expected output.
+
+## The suite
+
+```sh
+make check # behavioural tests against ./zash
+make asan # ASan + UBSan build, whole suite
+make valgrind # whole suite under Valgrind, leaks included
+make bench # CPU time against dash, bash, ksh, zsh, oksh
+make format tidy # clang-format, clang-tidy
+```
+
+The tests are at several levels:
+
+- Behavioural tests for every feature. Portable ones also run under dash, and
+ the outputs are compared, so a disagreement with an existing ash-family
+ shell is always visible - either a bug or a deliberate difference.
+- Sanitizer and Valgrind runs of the whole suite on Linux.
+- Process accounting tests that assert the exact process count of a construct,
+ so `$(echo x)` creating a process fails the suite instead of quietly costing
+ a `fork()`.
+- Security tests for what a shell must never do: create a file more permissive
+ than the umask allows, find a command in the current directory, or run what
+ an expansion or a file name produced.
+- Interactive tests that drive the shell through a pseudo-terminal: editor keys
+ in emacs and vi modes, completion, history, prompts, job control. They need
+ python3 and are skipped without it.
+
+On z/OS the same behavioural and process-accounting tests run in either
+character mode, plus a z/OS-only group. There is no ASan or Valgrind there;
+Language Environment's heap checker does that job instead.
+
+## Benchmarks as tests
+
+`bench/run.sh` compares each shell's output with the reference shell's, so a
+wrong answer fails the run instead of being timed and forgotten. `bench/
+report.sh` and `bench/deploy.sh` are the two scripts that look most like what
+the shell is for.