tap: Make output better. Add name is string checks

This commit is contained in:
retropikzel 2026-08-28 08:33:22 +03:00
parent bf72655dec
commit 4a4c138c02
2 changed files with 15 additions and 11 deletions

View File

@ -151,21 +151,25 @@
(else "other")))
(count (cdr (assoc (car (test-runner-group-stack runner))
group-test-counts)))
(name (if (string=? (test-runner-test-name runner) "")
""
(string-append " - " (test-runner-test-name runner)))))
(name
(cond ((not (string? (test-runner-test-name runner))) "")
((string=? (test-runner-test-name runner) "") "")
(else (string-append " - " (test-runner-test-name runner))))))
(cond ((equal? result-kind-name "fail")
(increase-group-fail-count (car (test-runner-group-stack runner)))
(display-map runner "not ok " count name #\newline)
(display-map runner " ---" #\newline)
(display-map runner " severity: fail" #\newline)
(display-map runner " data:" #\newline)
(display-map runner " source: " (test-result-ref runner 'source-form) #\newline)
(display-map runner " got: " (test-result-ref runner 'actual-value) #\newline)
(display-map runner " expect: " (test-result-ref runner 'expected-value) #\newline)
(display-map runner " at: " #\newline)
(display-map runner " file: " (test-result-ref runner 'source-file) #\newline)
(display-map runner " line: " (test-result-ref runner 'source-line) #\newline))
(when (test-result-ref runner 'source-form)
(display-map runner " source: " (test-result-ref runner 'source-form) #\newline))
(when (test-result-ref runner 'actual-value)
(display-map runner " got: " (test-result-ref runner 'actual-value) #\newline))
(when (test-result-ref runner 'expected-value)
(display-map runner " expect: " (test-result-ref runner 'expected-value) #\newline))
(when (test-result-ref runner 'source-file)
(display-map runner " file: " (test-result-ref runner 'source-file) #\newline))
(when (test-result-ref runner 'source-line)
(display-map runner " line: " (test-result-ref runner 'source-line) #\newline)))
((equal? result-kind-name "skip")
(display-map runner "ok " count name " # skip " #\newline))
(else (display-map runner "ok " count name #\newline)))))

View File

@ -1 +1 @@
1.1.1
1.2.0