about summary refs log tree commit diff
path: root/Test/D07multibyte.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-05-08 14:30:31 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-05-08 14:30:31 +0000
commitff0b4ebdd56b2986bccc35185ac85762f2d41d07 (patch)
tree3a2eafc0bbc148aaf12928b734f3c4effa0fdb8a /Test/D07multibyte.ztst
parentb2176aa525517dd17827c06a6b9c38db08628b52 (diff)
downloadzsh-ff0b4ebdd56b2986bccc35185ac85762f2d41d07.tar.gz
zsh-ff0b4ebdd56b2986bccc35185ac85762f2d41d07.tar.xz
zsh-ff0b4ebdd56b2986bccc35185ac85762f2d41d07.zip
26950: warn on failed attempt to change user or group ID
26593: print warning but dont fail test if simple Unicode conversion fails
Diffstat (limited to 'Test/D07multibyte.ztst')
-rw-r--r--Test/D07multibyte.ztst30
1 files changed, 19 insertions, 11 deletions
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
index c7ee5791b..3f4eaf9c0 100644
--- a/Test/D07multibyte.ztst
+++ b/Test/D07multibyte.ztst
@@ -378,17 +378,25 @@
 >X$'\300'Y$'\a'Z$'\177'T
 
 # This also isn't strictly multibyte and is here to reduce the
-# likelihood of a "can't do character set conversion" error.
-  testfn() { (LC_ALL=C; print $'\u00e9') }
-  repeat 4 testfn 2>&1 | while read line; do
-    if [[ $line = *"character not in range"* ]]; then
-      print OK
-    elif [[ $line = "?" ]]; then
-      print OK
-    else
-      print Failed: no error message and no question mark
-    fi
-  done
+# likelihood of a "cannot do character set conversion" error.
+  (print $'\u00e9') 2>&1 | read
+  if [[ $REPLY != é ]]; then
+    print "warning: your system can't do simple Unicode conversion." >&$ZTST_fd
+    print "Check you have a correctly installed iconv library." >&$ZTST_fd
+    # cheat
+    repeat 4 print OK
+  else
+    testfn() { (LC_ALL=C; print $'\u00e9') }
+    repeat 4 testfn 2>&1 | while read line; do
+      if [[ $line = *"character not in range"* ]]; then
+        print OK
+      elif [[ $line = "?" ]]; then
+        print OK
+      else
+        print Failed: no error message and no question mark
+      fi
+    done
+  fi
   true
 0:error handling in Unicode quoting
 >OK