about summary refs log tree commit diff
path: root/Test/B04read.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-07-24 18:35:49 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-07-24 18:35:49 +0000
commit72f0b14a0448ecf50935a1f6c90337c3d1c969af (patch)
treebe65fa2ba994792e2f5a4764b3fbe71b91af7778 /Test/B04read.ztst
parent2c8142351681124e8ce5f8f44a8539ae4e7bbe33 (diff)
downloadzsh-72f0b14a0448ecf50935a1f6c90337c3d1c969af.tar.gz
zsh-72f0b14a0448ecf50935a1f6c90337c3d1c969af.tar.xz
zsh-72f0b14a0448ecf50935a1f6c90337c3d1c969af.zip
27188: improve read -q by using read -k code
Diffstat (limited to 'Test/B04read.ztst')
-rw-r--r--Test/B04read.ztst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/B04read.ztst b/Test/B04read.ztst
index d6b7ce0b1..2c87aa67a 100644
--- a/Test/B04read.ztst
+++ b/Test/B04read.ztst
@@ -24,6 +24,18 @@
 0:read specified number of chars
 >foo
 
+ for char in y Y n N X $'\n'; do
+   read -q -u0 <<<$char
+   print $?
+ done
+0:read yes or no, default no
+>0
+>0
+>1
+>1
+>1
+>1
+
  read -d: <<<foo:bar
  print $REPLY
 0:read up to delimiter