1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-11 07:16:11 +00:00

Don't truncate test output on failures.

This commit is contained in:
Calvin Rose
2021-11-12 20:04:34 -06:00
parent 425a0fcf07
commit 6660c1da38
2 changed files with 3 additions and 4 deletions

View File

@@ -14,11 +14,9 @@
(++ num-tests-run)
(when x (++ num-tests-passed))
(def str (string e))
(def truncated
(if (> (length e) 40) (string (string/slice e 0 35) "...") (describe e)))
(if x
(when is-verbose (eprintf "\e[32m✔\e[0m %s: %v" truncated x))
(eprintf "\n\e[31m✘\e[0m %s: %v" truncated x))
(when is-verbose (eprintf "\e[32m✔\e[0m %s: %v" (describe e) x))
(eprintf "\n\e[31m✘\e[0m %s: %v" (describe e) x))
x)
(defmacro assert-error