From 5cdcba0a5c6d86889f0cd1a373d300e95505074c Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 19 Mar 2016 23:38:07 -0400 Subject: [PATCH] [test] redirect function=fail output, to hide it --- test/function-fail.rkt | 44 +++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/test/function-fail.rkt b/test/function-fail.rkt index 1d22e0e..20876a0 100644 --- a/test/function-fail.rkt +++ b/test/function-fail.rkt @@ -1,23 +1,27 @@ #lang racket/base -(require trivial/private/test-common) +(require + trivial/private/test-common + (only-in racket/port open-output-nowhere)) -(module+ test (test-compile-error - #:require trivial/function trivial/format - #:exn #rx"Type Checker|lambda:|λ:" ;; TODO, bummer to include lambda: - ((curry: (lambda (x y) x)) 0 1) - (((curry: (lambda (x y z) z)) 'x) 'y 'z) - (((curry: (lambda ([x : Integer] [y : Integer]) (+ x x y))) 'a) 'b) - ((((curry: (λ ([x : Any] [y : Any]) x)) 'a) 'b) 'c) - (map: (λ ([x : String] [y : String]) +(module+ test + (parameterize ([current-error-port (open-output-nowhere)]) ;; TODO + (test-compile-error + #:require trivial/function trivial/format + #:exn exn? ;#rx"Type Checker" + ((curry: (lambda (x y) x)) 0 1) + (((curry: (lambda (x y z) z)) 'x) 'y 'z) + (((curry: (lambda ([x : Integer] [y : Integer]) (+ x x y))) 'a) 'b) + ((((curry: (λ ([x : Any] [y : Any]) x)) 'a) 'b) 'c) + (map: (λ ([x : String] [y : String]) + (string-append x y)) + '("hello")) + (map: (λ ([x : String] [y : String]) (string-append x y)) - '("hello")) - (map: (λ ([x : String] [y : String]) - (string-append x y)) - '("hello") - '("world") - '("howareya")) - (map: (λ ([x : String] [y : String]) - (format: "~d ~d" x y)) - '("hello") - '("world")) -)) + '("hello") + '("world") + '("howareya")) + (map: (λ ([x : String] [y : String]) + (format: "~d ~d" x y)) + '("hello") + '("world")) +)))