diff --git a/collects/tests/drracket/language-test.rkt b/collects/tests/drracket/language-test.rkt index acb5fe8c23..ea5a1816cf 100644 --- a/collects/tests/drracket/language-test.rkt +++ b/collects/tests/drracket/language-test.rkt @@ -62,7 +62,7 @@ the settings above should match r5rs (test-expression "(define-struct spider (legs))(make-spider 4)" "#" - "define-values: cannot re-define a constant: struct:spider") + #rx"define-values: cannot re-define a constant.*struct:spider") (test-expression "(sqrt -1)" "0+1i") @@ -72,9 +72,9 @@ the settings above should match r5rs (test-expression "(define (. x y) (* x y))" #rx"read: illegal use of \"\\.\"" "") (test-expression "'(1 . 2)" "'(1 . 2)") - (test-expression "(define (f define) 1)" "" "define-values: cannot re-define a constant: f") - (test-expression "(define (f car) 1)" "" "define-values: cannot re-define a constant: f") - (test-expression "(define (f empty) 1)" "" "define-values: cannot re-define a constant: f") + (test-expression "(define (f define) 1)" "" #rx"define-values: cannot re-define a constant.*: f") + (test-expression "(define (f car) 1)" "" #rx"define-values: cannot re-define a constant.*: f") + (test-expression "(define (f empty) 1)" "" #rx"define-values: cannot re-define a constant.*: f") (test-expression "call/cc" "#") @@ -87,19 +87,19 @@ the settings above should match r5rs (test-expression "true" "#t") (test-expression "mred^" #rx"unbound identifier in module in: mred\\^" - #rx"reference to undefined identifier: mred\\^") + #rx"reference to undefined identifier.*: mred\\^") (test-expression "(eq? 'a 'A)" "#f") (test-expression "(set! x 1)" #rx"set!: unbound identifier in module in: x" - #rx"set!: cannot set undefined variable: x") + #rx"set!: cannot set undefined.*: x") (test-expression "(define qqq 2) (set! qqq 1)" "") (test-expression "(cond [(= 1 2) 3])" "") (test-expression "(cons 1 2)" "'(1 . 2)") - (test-expression "(+ (list 1) 2)" (regexp (regexp-quote "+: expects type as 1st argument, given: '(1); other arguments were: 2"))) + (test-expression "(+ (list 1) 2)" #rx"[+]: contract violation.*given: '[(]1[)]") (test-expression "'(1)" "'(1)") (test-expression "(define shrd (box 1)) (list shrd shrd)" "'(#&1 #&1)" - "define-values: cannot re-define a constant: shrd") + #rx"define-values: cannot re-define a constant.*: shrd") (test-expression "(local ((define x x)) 1)" "1") (test-expression "(letrec ([x x]) 1)" "1") (test-expression "(if 1 1 1)" "1") @@ -125,12 +125,12 @@ the settings above should match r5rs (test-expression ",1" "{stop-22x22.png} unquote: not in quasiquote in: (unquote 1)") (test-expression "(list 1)" "'(1)") - (test-expression "(car (list))" "{stop-multi.png} {stop-22x22.png} car: expects argument of type ; given: '()") + (test-expression "(car (list))" #rx"{stop-multi.png} {stop-22x22.png} car: contract violation.*given: '[(][)]") (test-expression "(current-command-line-arguments)" "'#()") (test-expression "(define-syntax app syntax-case)" "{stop-22x22.png} syntax-case: bad syntax in: syntax-case") - (test-expression "#lang racket" "" #rx"read: #lang not enabled in the current context") + (test-expression "#lang racket" #rx"read: #lang not enabled in the current context" "") (test-expression "(define (f)\n(+ (raise-user-error 'a \"b\")))\n(if (zero? (random 1)) (void) (set! f void))\n(f)" "a: b"))) @@ -192,13 +192,13 @@ the settings above should match r5rs #rx"cpu time: [0-9]+ real time: [0-9]+ gc time: [0-9]+\n1") (test-expression "true" "#t") - (test-expression "mred^" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: mred^") + (test-expression "mred^" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: mred\\^") (test-expression "(eq? 'a 'A)" "#f") - (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined variable: x") + (test-expression "(set! x 1)" #rx"{stop-multi.png} {stop-22x22.png} set!: cannot set undefined.*: x") (test-expression "(define qqq 2) (set! qqq 1)" "") (test-expression "(cond [(= 1 2) 3])" "") (test-expression "(cons 1 2)" "(1 . 2)") - (test-expression "(+ (list 1) 2)" "{stop-multi.png} {stop-22x22.png} +: expects type as 1st argument, given: (1); other arguments were: 2") + (test-expression "(+ (list 1) 2)" #rx"{stop-multi.png} {stop-22x22.png} [+]: contract violation.*given: [(]1[)]") (test-expression "'(1)" "(1)") (test-expression "(define shrd (box 1)) (list shrd shrd)" "(#&1 #&1)") @@ -227,7 +227,7 @@ the settings above should match r5rs (test-expression ",1" "{stop-22x22.png} unquote: not in quasiquote in: (unquote 1)") (test-expression "(list 1)" "(1)") - (test-expression "(car (list))" "{stop-multi.png} {stop-22x22.png} car: expects argument of type ; given: ()") + (test-expression "(car (list))" #rx"{stop-multi.png} {stop-22x22.png} car: contract violation.*given: [(][)]") (test-expression "(current-command-line-arguments)" "#()") (test-expression "(define-syntax app syntax-case)" "{stop-22x22.png} syntax-case: bad syntax in: syntax-case") @@ -274,12 +274,12 @@ the settings above should match r5rs (test-expression "(define-struct spider (legs))(make-spider 4)" - "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: define-struct") + #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: define-struct") (test-expression "(sqrt -1)" "0+1i") - (test-expression "class" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: class") - (test-expression "shared" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: shared") + (test-expression "class" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: class") + (test-expression "shared" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: shared") (test-expression "(define (. x y) (* x y))" #rx"read: illegal use of \"\\.\"") (test-expression "'(1 . 2)" "(1 . 2)") @@ -288,22 +288,22 @@ the settings above should match r5rs (test-expression "(define (f car) 1)" "") (test-expression "(define (f empty) 1)" "") - (test-expression "call/cc" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: call/cc") + (test-expression "call/cc" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: call/cc") - (test-expression "(error 'a \"~a\" 1)" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: error") - (test-expression "(error \"a\" \"a\")" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: error") + (test-expression "(error 'a \"~a\" 1)" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: error") + (test-expression "(error \"a\" \"a\")" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: error") (test-expression "(time 1)" - "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: time") + #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: time") - (test-expression "true" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: true") - (test-expression "mred^" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: mred^") + (test-expression "true" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: true") + (test-expression "mred^" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: mred\\^") (test-expression "(eq? 'a 'A)" "#t") - (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined variable: x") + (test-expression "(set! x 1)" #rx"{stop-multi.png} {stop-22x22.png} set!: cannot set undefined.*: x") (test-expression "(define qqq 2) (set! qqq 1)" "") (test-expression "(cond ((= 1 2) 3))" "") (test-expression "(cons 1 2)" "(1 . 2)") - (test-expression "(+ (list 1) 2)" "{stop-multi.png} {stop-22x22.png} +: expects type as 1st argument, given: (1); other arguments were: 2") + (test-expression "(+ (list 1) 2)" #rx"{stop-multi.png} {stop-22x22.png} [+]: contract violation.*given: [(]1[)]") (test-expression "'(1)" "(1)") (test-expression "(define shrd (cons 1 1)) (list shrd shrd)" "((1 . 1) (1 . 1))") @@ -328,16 +328,16 @@ the settings above should match r5rs (test-expression "+1/2i" "0+1/2i") (test-expression "779625/32258" "{number 779625/32258 \"24 5433/32258\" mixed}") (test-expression "(exact? 1.5)" "#f") - (test-expression "(print (floor (sqrt 2)))" #rx"reference to undefined identifier: print") + (test-expression "(print (floor (sqrt 2)))" #rx"reference to undefined identifier.*: print") (test-expression "(let ((f (lambda (x) x))) f)" "#") (test-expression ",1" "{stop-22x22.png} unquote: not in quasiquote in: (unquote 1)") (test-expression "(list 1)" "(1)") (test-expression "(car (list))" - "{stop-multi.png} {stop-22x22.png} mcar: expects argument of type ; given: ()") + #rx"{stop-multi.png} {stop-22x22.png} mcar: contract violation.*given: [(][)]") - (test-expression "argv" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: argv") + (test-expression "argv" #rx"{stop-multi.png} {stop-22x22.png} reference to undefined identifier.*: argv") (test-expression "(define-syntax app syntax-case)" "{stop-22x22.png} macro-transformer: only a `syntax-rules' form is allowed in: syntax-case") @@ -1173,6 +1173,7 @@ the settings above should match r5rs (eprintf "expected lines: \n ~a\n ~a\ngot lines:\n ~a\n ~a\n" line0-expect line1-expect line0-got line1-got) + (eprintf "defs: ~s" (queue-callback/res (λ () (send (send drs get-definitions-text) get-text)))) (error 'language-test.rkt "failed get top of repl test")))))