summaryrefslogtreecommitdiffhomepage
path: root/tests/linux/errors.exp
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-12 17:42:49 +0000
committerSean Kurtz <seankurtz75@gmail.com>2026-11-12 17:42:49 +0000
commitc3b270f82dd62a56e9d75cdd652c55a694a2da64 (patch)
tree0e97654333e4cc6245d632156275c3d4f2301ae5 /tests/linux/errors.exp
downloadzash-c3b270f82dd62a56e9d75cdd652c55a694a2da64.tar.gz
zash: scripting core, test suite and benchmarks
A clean-slate POSIX shell for z/OS UNIX in the Almquist tradition, written in C23 for Clang (Linux) and IBM Open XL C/C++ (z/OS). - Parser, expansion, arithmetic, redirection, traps and builtins. - Spawn-first execution: fd plans instead of fork+dup2, in-shell pure builtins for pipelines and command substitution, $(a | b) without a subshell. - Flat .POSIX Makefile; asan, valgrind, bench, compdb and z/OS targets. - Tests: posix (dash-generated), zash, process accounting, linux, zos. Nothing has been compiled or run on z/OS yet.
Diffstat (limited to 'tests/linux/errors.exp')
-rw-r--r--tests/linux/errors.exp52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/linux/errors.exp b/tests/linux/errors.exp
new file mode 100644
index 0000000..9d2eda2
--- /dev/null
+++ b/tests/linux/errors.exp
@@ -0,0 +1,52 @@
+SCRIPT: line 2: arithmetic: syntax error: "1+"
+s=2
+SCRIPT: line 3: r: is read only
+s=2
+SCRIPT: line 4: unset_variable: parameter not set
+s=2
+SCRIPT: line 5: cd: /nonexistent: No such file or directory
+s=1
+SCRIPT: line 6: nonexistent_cmd: not found
+s=127
+SCRIPT: line 7: .: /nonexistent/file: not found
+s=2
+SCRIPT: line 8: shift: cannot shift 3
+s=2
+s=0
+return outside s=0
+SCRIPT: line 12: syntax error: unexpected 'end of file'
+s=2
+SCRIPT: line 12: trap: BOGUS: bad signal
+s=1
+SCRIPT: line 13: kill: bad signal
+s=2
+SCRIPT: line 14: 9: bad file descriptor
+s=2
+SCRIPT: line 15: cannot create /: Is a directory
+s=2
+SCRIPT: line 16: printf: abc: expected numeric value
+0
+s=1
+SCRIPT: line 17: test: x: integer expected
+s=2
+SCRIPT: line 18: umask: xyz: bad mask
+s=1
+SCRIPT: line 19: write error: No space left on device
+write error s=1
+SCRIPT: line 20: bogus: bad option name
+s=2
+s=0
+SCRIPT: line 22: export: 1bad=x: bad variable name
+s=2
+SCRIPT: line 23: getopts: usage: getopts optstring name [arg ...]
+s=2
+SCRIPT: line 24: wait: abc: bad process id
+s=2
+echo is a shell builtin
+cd is a shell builtin
+if is a shell keyword
+SCRIPT: line 25: nonexistent_zz: not found
+SCRIPT: line 25: f: not found
+f is a shell function
+echo is a shell builtin
+[status 0]