From 6914c5667c8e5f86c85e002b008603730bdffda9 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 9 Feb 2012 10:16:47 -0600 Subject: [PATCH] adjust test suite to match new lack-of-absolute-paths feature --- collects/redex/tests/test-util.rkt | 13 +++++++++---- collects/redex/tests/tl-test.rkt | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/collects/redex/tests/test-util.rkt b/collects/redex/tests/test-util.rkt index e321aee113..65dd8af626 100644 --- a/collects/redex/tests/test-util.rkt +++ b/collects/redex/tests/test-util.rkt @@ -48,10 +48,15 @@ (with-handlers ([exn:fail? (λ (exn) (values (exn-message exn) - (let ([marks (continuation-mark-set->list - (exn-continuation-marks exn) - errortrace-key)]) - (if (null? marks) '() (list (cdar marks))))))]) + (let ([ans (let ([marks (continuation-mark-set->list + (exn-continuation-marks exn) + errortrace-key)]) + (if (null? marks) '() (list (cdar marks))))]) + (let loop ([ans ans]) + (cond + [(pair? ans) (cons (loop (car ans)) (loop (cdr ans)))] + [(path? ans) (path->relative-string/library ans)] + [else ans])))))]) (thunk)))) (define ((exec-error-tests setup exec) path) diff --git a/collects/redex/tests/tl-test.rkt b/collects/redex/tests/tl-test.rkt index 14a13c920d..e8a2578d66 100644 --- a/collects/redex/tests/tl-test.rkt +++ b/collects/redex/tests/tl-test.rkt @@ -2753,7 +2753,7 @@ (test (capture-output (test-->> red 1 2) (test-results)) "One test passed.\n") (test (capture-output (test-->> red 2 3) (test-results)) - #rx"FAILED tl-test.(?:.+):[0-9.]+\nexpected: 3\n actual: 2\n1 test failed \\(out of 1 total\\).\n")) + #rx"FAILED .*tl-test.(?:.+):[0-9.]+\nexpected: 3\n actual: 2\n1 test failed \\(out of 1 total\\).\n")) (let () (define red-share (reduction-relation @@ -2772,7 +2772,7 @@ (test (capture-output (test-->> red-cycle #:cycles-ok (term a)) (test-results)) "One test passed.\n") (test (capture-output (test-->> red-cycle (term a)) (test-results)) - #rx"FAILED tl-test.(?:.+):[0-9.]+\nfound a cycle in the reduction graph\n1 test failed \\(out of 1 total\\).\n")) + #rx"FAILED .*tl-test.(?:.+):[0-9.]+\nfound a cycle in the reduction graph\n1 test failed \\(out of 1 total\\).\n")) (let () (define subred (reduction-relation empty-language (--> natural ,(- (term natural) 1)))) @@ -2781,7 +2781,7 @@ (test (capture-output (test-->> subred #:pred number? 1 -1) (test-results)) "One test passed.\n") (test (capture-output (test-->> subred #:pred odd? 1 -1) (test-results)) - #rx"FAILED tl-test.rkt:[0-9.]+\nfound a term that failed #:pred: 0\n1 test failed \\(out of 1 total\\).\n")) + #rx"FAILED .*tl-test.rkt:[0-9.]+\nfound a term that failed #:pred: 0\n1 test failed \\(out of 1 total\\).\n")) (let () (define-metafunction empty-language [(f any) ((any))]) @@ -2824,7 +2824,7 @@ (test (capture-output (test--> R #:equiv mod2=? 7 1 0) (test-results)) "One test passed.\n") (test (capture-output (test--> R #:equiv mod2=? 7 1) (test-results)) - #rx"FAILED tl-test\\.(?:.+):[0-9.]+\nexpected: 1\n actual: 8\n actual: 7\n1 test failed \\(out of 1 total\\).\n")) + #rx"FAILED .*tl-test\\.(?:.+):[0-9.]+\nexpected: 1\n actual: 8\n actual: 7\n1 test failed \\(out of 1 total\\).\n")) (let-syntax ([test-bad-equiv-arg (λ (stx)