<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests/posix/printf-ext.sh, branch main</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=main</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-28T22:34:52Z</updated>
<entry>
<title>tests: cover the review fixes that landed without one</title>
<updated>2026-11-28T22:34:52Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T22:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=648125a5ef1a98519c5d2cd66c4f015bcb8b5b1f'/>
<id>urn:sha1:648125a5ef1a98519c5d2cd66c4f015bcb8b5b1f</id>
<content type='text'>
The 2026-11-28 review merge (#46) and the in-process `( cd dir )` merge
(#31) left four changes with no test of their own. Three of the eighteen
commits cannot have one, see below.

- tests/posix/glob-edge.sh: `deep/*` where `deep` holds a file, a
  subdirectory, a symlink and a dangling symlink. This is the path the
  glob change takes when the last component has no literal tail left:
  it adds what readdir() named without an lstat(), so a directory and a
  broken link must still appear. Replacing `sb_cstr(&amp;g-&gt;path)` with the
  unterminated buffer in that call makes this test fail.
- tests/posix/charset.sh: a reversed range `[z-a]` matches nothing,
  which is what dash and bash do; the ASCII fast path compares bytes
  where the EBCDIC path looks up a table, so the two must agree on the
  edge.
- tests/posix/printf-ext.sh: a 5000-character `%s`. The bare `%s` fast
  path writes the argument straight to the output instead of through
  the format buffer, so length is now the output's business.
- tests/zash/heredoc-tmpdir.sh: a TMPDIR longer than PATH_MAX still
  produces the here-document, through the pipe fallback.
- .exp files regenerated with dash (posix) and ./zash (zash), then
  reviewed: only the added lines differ.

The three commits with no test:

- 270ac66 `signal()` to `sigaction()` for SIG_DFL: the disposition set is
  the same, so no test can tell the two apart.
- 06e1dd5 the arena size guard: reaching it needs a SIZE_MAX/2
  allocation.
- de0d26a the TMPDIR length check itself: a truncated temp name has no
  `XXXXXX` left, so mkstemp() already failed and the pipe fallback
  already ran. heredoc-tmpdir.sh pins that fallback, not the check.

Verified on Linux (7.3.4-300.fc45.x86_64, 2026-11-28): make check 128
passed, 1 skipped, the known linux/i-dscomplete failure; make asan the
same with no sanitizer report; the new posix tests pass against dash too.
</content>
</entry>
<entry>
<title>fix(printf): a negative '*' precision is no precision</title>
<updated>2026-11-28T06:26:01Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:26:01Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=a5a920383fe85f4dada0cb80418f7a935c12dc4a'/>
<id>urn:sha1:a5a920383fe85f4dada0cb80418f7a935c12dc4a</id>
<content type='text'>
`printf '%.*d' -5 1` built the conversion "%.-5jd" and printed it
literally: a width and precision taken with '*' were written with "%d"
of an (int) cast, so a negative precision produced ".-5" in the spec.

copy_number() now writes the value with "%jd" - no narrowing, which the
review asked for - and, for a precision, drops the '.' again when the
value is negative: C99 says a negative precision is as if it were
omitted.  A negative width stays, where snprintf() reads the '-' as a
flag.

tests/posix/printf-ext.sh covers all four shapes; the expected output
is what dash and bash print.

Verified: make check, and the same test under ASan+UBSan on Linux.
</content>
</entry>
<entry>
<title>Edge-case, integration and z/OS tests, including z/OS stand-ins</title>
<updated>2026-11-15T15:20:17Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-15T15:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=cadb5af9226553357a48b86bdaf057b10bf44d1d'/>
<id>urn:sha1:cadb5af9226553357a48b86bdaf057b10bf44d1d</id>
<content type='text'>
New groups: tests/scripts (integration, expectations from dash) and
z/OS data set, tso, EBCDIC and tagging tests with Linux stand-ins.
</content>
</entry>
</feed>
