summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xTest/ztst.zsh15
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 11829e3a6..f55891b47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-25 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 46102: Test/ztst.zsh: test harness: Make the XPass message
+ distinct from the Fail message.
+
2020-06-22 Peter Stephenson <p.stephenson@samsung.com>
* 46079: Src/math.c, Test/C01arith.ztst: Ignore double quotes in
diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index 375efd16c..e668ae942 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -146,6 +146,19 @@ $ZTST_failmsg"
ZTST_testfailed=1
return 1
}
+ZTST_testxpassed() {
+ print -r "Test $ZTST_testname was expected to fail, but passed."
+ if [[ -n $ZTST_message ]]; then
+ print -r "Was testing: $ZTST_message"
+ fi
+ print -r "$ZTST_testname: test XPassed."
+ if [[ -n $ZTST_failmsg ]]; then
+ print -r "The following may (or may not) help identifying the cause:
+$ZTST_failmsg"
+ fi
+ ZTST_testfailed=1
+ return 1
+}
# Print messages if $ZTST_verbose is non-empty
ZTST_verbose() {
@@ -520,7 +533,7 @@ $ZTST_code"
return 1
fi
if (( expected_to_fail )); then
- ZTST_testfailed "test was expected to fail, but passed."
+ ZTST_testxpassed
return 1
fi
fi