<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests/linux/i-vi.exp, 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-28T06:39:28Z</updated>
<entry>
<title>fix(edit): vi search reads its pattern into a buffer of its own</title>
<updated>2026-11-28T06:39:28Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:39:28Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=95bf87d4ed037e6d6786cc395d94dbe44ee88e32'/>
<id>urn:sha1:95bf87d4ed037e6d6786cc395d94dbe44ee88e32</id>
<content type='text'>
`/` wrote the new pattern over the old one in ed.search and only wrote a
terminator when something had been typed.  Type `ban` over `apple`, delete
the three letters, press Enter: the buffer still held "banle", so the
"empty pattern repeats the previous search" case searched a mix of the two
and found nothing (the terminal just beeped).

vi_read_pattern() collects the pattern in a local array and copies it into
ed.search only when it is non-empty; an empty pattern now really does leave
the previous one alone.

Test: tests/linux/i-vi.sh searches for apple, then types `ban` + three
backspaces + Enter, and expects `echo apple` back.  Without the change the
line stays empty.

Verified on Linux with make check.
</content>
</entry>
<entry>
<title>fix(edit): vi `y` keeps the line and never pastes the old kill</title>
<updated>2026-11-28T06:30:30Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:30:30Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=56bd0e6c2ab87ab140cef35882cff52153f36b7c'/>
<id>urn:sha1:56bd0e6c2ab87ab140cef35882cff52153f36b7c</id>
<content type='text'>
`y0` with the cursor at column 0 yanks an empty range, and the old code
then inserted the kill buffer at the cursor: with nothing killed yet that
was memcpy(dst, nullptr, 0), which UBSan rejects at src/edit_builtin.c:375;
with an earlier `cw` behind it, the old kill text was pasted into the
line (vi `y` changes nothing on the line).

The `y` case now copies the range into the kill buffer with kill_set() -
the same block remove_range() used - and puts the cursor at the start of
the range, which is where vi leaves it.  insert() also returns early for
an empty string, so a later caller cannot repeat the null memcpy.

Test: tests/linux/i-vi.sh yanks an empty range after a `cw`, so the kill
buffer holds text that must not appear.  Before the change UBSan reports
"null pointer passed as argument 2" and the line comes out as
"oneecho yank"; after it, the line is "echo yank".

Verified on Linux with make check and the same pty session under
ASan+UBSan.
</content>
</entry>
<entry>
<title>tests: regenerate i-vi.exp for the change and dot-repeat steps</title>
<updated>2026-11-28T06:12:03Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=8ac2777c82668c46c24bb0f3047c1128f9553760'/>
<id>urn:sha1:8ac2777c82668c46c24bb0f3047c1128f9553760</id>
<content type='text'>
The script gained the change/dot-repeat steps but the expected output
still stopped at 'echo done'.  The ten lines it prints now are right:
0wx.. deletes three letters, 0dw. deletes two words, and after a motion
(l) the dot repeats the last change (x), not the motion.
</content>
</entry>
<entry>
<title>Tests and benchmarks for the extensions and the interactive layer</title>
<updated>2026-11-13T02:24:40Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-13T02:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=7ba635888bfcc75e6c424c9614b42d585c22171e'/>
<id>urn:sha1:7ba635888bfcc75e6c424c9614b42d585c22171e</id>
<content type='text'>
New zash/ tests for each extension, a proc/ test showing they create no
processes, and linux/i-*.sh tests that drive the interactive shell on a
pseudo-terminal (tests/tools/ptydrive.py; skipped without python3).
The runner counts exit status 77 as "skipped".  Adds a benchmark for
the arithmetic commands and removes a stray file from tests/posix.
</content>
</entry>
</feed>
