diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2000-06-07 09:02:23 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2000-06-07 09:02:23 +0000 |
| commit | b24757fc343f8ff2d54fb2e5ab089d3fdab13c01 (patch) | |
| tree | 3731e4551721fd9942a086ce237b15143e425137 /Test/ztst.zsh | |
| parent | hopefully more consistent beeping with menu-selection (11794) (diff) | |
| download | zsh-b24757fc343f8ff2d54fb2e5ab089d3fdab13c01.tar zsh-b24757fc343f8ff2d54fb2e5ab089d3fdab13c01.tar.gz zsh-b24757fc343f8ff2d54fb2e5ab089d3fdab13c01.tar.bz2 zsh-b24757fc343f8ff2d54fb2e5ab089d3fdab13c01.tar.lz zsh-b24757fc343f8ff2d54fb2e5ab089d3fdab13c01.tar.xz zsh-b24757fc343f8ff2d54fb2e5ab089d3fdab13c01.tar.zst zsh-b24757fc343f8ff2d54fb2e5ab089d3fdab13c01.zip | |
11711: Andrej: diff output workaround
Diffstat (limited to 'Test/ztst.zsh')
| -rwxr-xr-x | Test/ztst.zsh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Test/ztst.zsh b/Test/ztst.zsh index 69306cb81..c34303816 100755 --- a/Test/ztst.zsh +++ b/Test/ztst.zsh @@ -219,6 +219,19 @@ $ZTST_code" done } +# diff wrapper +ZTST_diff() { + local diff_out diff_ret + + diff_out=$(diff "$@") + diff_ret="$?" + if [[ "$diff_ret" != "0" ]]; then + echo "$diff_out" + fi + + return "$diff_ret" +} + ZTST_test() { local last match mbegin mend found @@ -297,13 +310,13 @@ ZTST_test: and standard error: $(<$ZTST_terr)" # Now check output and error. - if [[ $ZTST_flags != *d* ]] && ! diff -c $ZTST_out $ZTST_tout; then + if [[ $ZTST_flags != *d* ]] && ! ZTST_diff -c $ZTST_out $ZTST_tout; then ZTST_testfailed "output differs from expected as shown above for: $ZTST_code${$(<$ZTST_terr):+ Error output: $(<$ZTST_terr)}" fi - if [[ $ZTST_flags != *D* ]] && ! diff -c $ZTST_err $ZTST_terr; then + if [[ $ZTST_flags != *D* ]] && ! ZTST_diff -c $ZTST_err $ZTST_terr; then ZTST_testfailed "error output differs from expected as shown above for: $ZTST_code" fi |
