diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2021-02-21 12:22:06 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2021-02-21 12:22:06 +0100 |
commit | 7545130ac74c5a6f3dfa62087ac0287686248eec (patch) | |
tree | c704f0b80edb3349d1a15ce2b468fdf709d03815 /test | |
parent | 543578b20187836a83d84c7cd669cb2448e3a3d7 (diff) |
test suite: Don't try to show stderr if it's empty.
Diffstat (limited to 'test')
-rwxr-xr-x | test | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -197,9 +197,11 @@ run() { set +x local rv=\$? i if [ \$rv -eq 0 ]; then rv=1; fi - echo "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv" - cat <"\$STDERR" >&2 - echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + if [ -s "\$STDERR" ]; then + echo "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv" + cat <"\$STDERR" >&2 + echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + fi [ \$# -eq 0 ] || echo "Error: \$*" >&2 exit \$rv } |