1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 00:10:27 +00:00

Prevent some potential bad characters in test out.

This commit is contained in:
Calvin Rose 2020-12-06 17:10:18 -06:00
parent 0f16f21677
commit 811a5d93f4

View File

@ -13,7 +13,7 @@
(when x (++ num-tests-passed)) (when x (++ num-tests-passed))
(def str (string e)) (def str (string e))
(def truncated (def truncated
(if (> (length e) 40) (string (string/slice e 0 35) "...") (string e))) (if (> (length e) 40) (string (string/slice e 0 35) "...") (describe e)))
(if x (if x
(eprintf "\e[32m✔\e[0m %s: %v" truncated x) (eprintf "\e[32m✔\e[0m %s: %v" truncated x)
(eprintf "\n\e[31m✘\e[0m %s: %v" truncated x)) (eprintf "\n\e[31m✘\e[0m %s: %v" truncated x))