add a test for minimum value for error-print-width

This commit is contained in:
Sorawee Porncharoenwase 2020-03-05 20:05:53 -08:00 committed by Matthew Flatt
parent 8f286fc810
commit b8eee66b72

View File

@ -304,6 +304,14 @@
(test #f 'path-in-code?4 (regexp-match? (regexp-quote (path->bytes super)) (get-output-string o))))) (test #f 'path-in-code?4 (regexp-match? (regexp-quote (path->bytes super)) (get-output-string o)))))
(loop super))))) (loop super)))))
;; ----------------------------------------
;; make sure the minimum value (3) is ok for `error-print-width':
(parameterize ([error-print-width 3])
(test "..." format "~.a" "abcd")
(test "abc" format "~.a" "abc")
(test "ab" format "~.a" "ab")
(test 3 error-print-width))
;; ---------------------------------------- ;; ----------------------------------------
;; make sure +inf.0 is ok for `print-syntax-width': ;; make sure +inf.0 is ok for `print-syntax-width':
(parameterize ([print-syntax-width +inf.0]) (parameterize ([print-syntax-width +inf.0])