summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2026-06-15 18:18:38 +0200
committerMikael Magnusson <mikachu@gmail.com>2026-07-04 19:56:26 +0200
commit4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb (patch)
tree824833e121c1784a0f23770b3d7f9af612c7bc09 /Test
parentunposted: complete more media file types (diff)
downloadzsh-4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb.tar
zsh-4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb.tar.gz
zsh-4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb.tar.bz2
zsh-4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb.tar.lz
zsh-4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb.tar.xz
zsh-4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb.tar.zst
zsh-4b4ebccaa9666c608f18f73c5b8102cbfc8e8deb.zip
54783: improve checkptycmd
With the previous (and now fallback) version of checkptycmd(), doing this: zpty foo 'while read; do echo hi; done' zpty (or zpty -t foo) would hang forever, which seems counterintuitive to the purpose of listing processes (or testing if a process is running).
Diffstat (limited to 'Test')
-rw-r--r--Test/V08zpty.ztst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/V08zpty.ztst b/Test/V08zpty.ztst
index 057db2e18..cad6bb9bd 100644
--- a/Test/V08zpty.ztst
+++ b/Test/V08zpty.ztst
@@ -25,3 +25,15 @@
zpty -d cat
0:zpty with a process that does not set up the terminal: write via stdin
>a line of text
+
+ zpty loop 'while read; do echo hello; done'
+ zpty -w loop hi
+ zpty -rt loop | tr -d $'\r'
+ zpty -w loop hi
+ zpty -t loop
+ zpty -rt loop | tr -d $'\r'
+ zpty -rt loop
+ zpty -d loop
+0:zpty doesn't duplicate data
+>hello
+>hello