mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-10 18:58:03 +02:00
52393: fix tests on Solaris by omitting -a option to diff as it is not supported there
This commit is contained in:
parent
58840922ee
commit
10c3ed20c7
2 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
||||||
2023-12-13 Oliver Kiddle <opk@zsh.org>
|
2023-12-13 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 52393: Test/ztst.zsh: fix tests on Solaris by omitting -a option
|
||||||
|
to diff as it is not supported there
|
||||||
|
|
||||||
* 52392: Src/makepro.awk: use octal escape to match = without
|
* 52392: Src/makepro.awk: use octal escape to match = without
|
||||||
error messages from either GNU awk or Solaris awk
|
error messages from either GNU awk or Solaris awk
|
||||||
|
|
||||||
|
|
|
@ -326,6 +326,7 @@ ZTST_diff() {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
setopt extendedglob
|
setopt extendedglob
|
||||||
|
|
||||||
|
local -a diff_arg
|
||||||
local diff_out
|
local diff_out
|
||||||
integer diff_pat diff_ret
|
integer diff_pat diff_ret
|
||||||
|
|
||||||
|
@ -342,6 +343,7 @@ ZTST_diff() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
|
[[ $OSTYPE != solaris* ]] && diff_arg=( -a )
|
||||||
|
|
||||||
if (( diff_pat )); then
|
if (( diff_pat )); then
|
||||||
local -a diff_lines1 diff_lines2
|
local -a diff_lines1 diff_lines2
|
||||||
|
@ -382,7 +384,7 @@ ZTST_diff() {
|
||||||
diff_ret=1
|
diff_ret=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
diff_out=$(diff -a "$@")
|
diff_out=$(diff $diff_arg "$@")
|
||||||
diff_ret="$?"
|
diff_ret="$?"
|
||||||
if [[ "$diff_ret" != "0" ]]; then
|
if [[ "$diff_ret" != "0" ]]; then
|
||||||
print -r -- "$diff_out"
|
print -r -- "$diff_out"
|
||||||
|
|
Loading…
Reference in a new issue