Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Avoid \e in C code; building on Solaris 11



Bart Schaefer wrote:
> On Fri, Dec 8, 2023 at 2:03 PM Bart Schaefer <[1]schaefer@xxxxxxxxxxxxxxxx>
> wrote:
>
>     The test is confirming that zexpandtabs() doesn't infinite-loop on broken
>     multibyte input which might include nul bytes.  Could replace the "tr" with
>     something else.
>
>
> E.g. (not bothering to worry about gmail wrapping here)

That works. Thanks

Any objection to the following so that manual hacks are not needed to
run the test cases. This is just checking $OSTYPE for solairs.

Incidentally, I tried whether the new ${ print -x4 $foo } form might
also work here and it results in an extra trailing blank line in each
case. Is that difference expected?

Oliver

diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index ea1b016d5..1d05baddf 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -326,6 +326,7 @@ ZTST_diff() {
   emulate -L zsh
   setopt extendedglob
 
+  local -a diff_arg
   local diff_out
   integer diff_pat diff_ret
 
@@ -342,6 +343,7 @@ ZTST_diff() {
     ;;
   esac
   shift
+  [[ $OSTYPE != solaris* ]] && diff_arg=( -a )
       
   if (( diff_pat )); then
     local -a diff_lines1 diff_lines2
@@ -382,7 +384,7 @@ ZTST_diff() {
       diff_ret=1
     fi
   else
-    diff_out=$(diff -a "$@")
+    diff_out=$(diff $diff_arg "$@")
     diff_ret="$?"
     if [[ "$diff_ret" != "0" ]]; then
       print -r -- "$diff_out"




Messages sorted by: Reverse Date, Date, Thread, Author