summaryrefslogtreecommitdiff
path: root/Test/ztst.zsh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2023-12-13 11:40:03 +0100
committerOliver Kiddle <opk@zsh.org>2023-12-13 11:40:03 +0100
commit10c3ed20c7068a0564a812ddc232c8f35500813d (patch)
tree6e93c348d04cf2693e7b91c047e215293dc8169a /Test/ztst.zsh
parent58840922eeefc90f3e688853ac6ec365fadc3445 (diff)
downloadzsh-10c3ed20c7068a0564a812ddc232c8f35500813d.tar.gz
zsh-10c3ed20c7068a0564a812ddc232c8f35500813d.zip
52393: fix tests on Solaris by omitting -a option to diff as it is not supported there
Diffstat (limited to 'Test/ztst.zsh')
-rwxr-xr-xTest/ztst.zsh4
1 files changed, 3 insertions, 1 deletions
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"