about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/B04read.ztst12
-rw-r--r--Test/D07multibyte.ztst6
2 files changed, 18 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
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
index 3f4eaf9c0..53cbe2a1d 100644
--- a/Test/D07multibyte.ztst
+++ b/Test/D07multibyte.ztst
@@ -232,6 +232,12 @@
 <«»ignored
 >«»
 
+  read -q -u0 mb
+  print $?
+0:multibyte character makes read -q return false
+<«
+>1
+
   # See if the system grokks first-century Greek...
   ioh="Ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν, καὶ θεὸς ἦν ὁ λόγος."
   for (( i = 1; i <= ${#ioh}; i++ )); do