IN PROGRESS: starting to fix the repl-test for the new error icons
This commit is contained in:
parent
cfc465932e
commit
8ec968fe8f
|
@ -59,7 +59,7 @@ This produces an ACK message
|
|||
(string-append
|
||||
(regexp-quote "#<syntax:")
|
||||
".*"
|
||||
(regexp-quote "tests/drracket/repl-test-tmp")
|
||||
a (regexp-quote "tests/drracket/repl-test-tmp")
|
||||
"3?"
|
||||
(regexp-quote ".rkt")))
|
||||
|
||||
|
@ -77,6 +77,10 @@ This produces an ACK message
|
|||
"[0-9]+:[0-9]+: "
|
||||
(regexp-quote str))))
|
||||
|
||||
;; err-prefix : string -> regexp
|
||||
(define (err-prefix x)
|
||||
(regexp (string-append "({[^]*}|){[^]*} " (regexp-quote x))))
|
||||
|
||||
(define test-data
|
||||
(list
|
||||
;; basic tests
|
||||
|
@ -93,7 +97,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "\"a\""
|
||||
|
||||
("\"a\""
|
||||
"\"a\""
|
||||
"\"a\""
|
||||
|
@ -106,7 +109,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "1 2"
|
||||
|
||||
("1\n2"
|
||||
"2"
|
||||
"2"
|
||||
|
@ -119,7 +121,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "\"a\" \"b\""
|
||||
|
||||
("\"a\"\n\"b\""
|
||||
"\"b\""
|
||||
"\"b\""
|
||||
|
@ -132,38 +133,36 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "("
|
||||
("{stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: read: expected a `)' to close `('"
|
||||
"{stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: read: expected a `)' to close `('")
|
||||
((err-prefix "read: expected a `)' to close `('")
|
||||
(err-prefix "read: expected a `)' to close `('")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: read: expected a `)' to close `('")
|
||||
(err-prefix "read: expected a `)' to close `('")
|
||||
(err-prefix "read: expected a `)' to close `('")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: read: expected a `)' to close `('"))
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest "."
|
||||
|
||||
("{stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: read: illegal use of \".\""
|
||||
"{stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: read: illegal use of \".\"")
|
||||
((err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: read: illegal use of \".\""))
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest "(lambda ())"
|
||||
|
||||
("{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:0: lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} {stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: lambda: bad syntax in: (lambda ())")
|
||||
((err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: lambda: bad syntax in: (lambda ())"))
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -171,32 +170,30 @@ This produces an ACK message
|
|||
|
||||
;; make sure only a single syntax error occurs when in nested begin situation
|
||||
(mktest "(begin (lambda ()) (lambda ()))"
|
||||
|
||||
("{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:7: lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} {stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:7: lambda: bad syntax in: (lambda ())")
|
||||
((err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:7: lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:7: lambda: bad syntax in: (lambda ())"))
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest "xx"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: reference to undefined identifier: xx"
|
||||
((err-prefix "reference to undefined identifier: xx")
|
||||
(err-prefix "reference to undefined identifier: xx")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: reference to undefined identifier: xx")
|
||||
"reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
(mktest "(raise 1)"
|
||||
|
||||
(mktest "(raise 1)"
|
||||
("uncaught exception: 1"
|
||||
"uncaught exception: 1"
|
||||
"uncaught exception: 1"
|
||||
|
@ -207,8 +204,8 @@ This produces an ACK message
|
|||
#f
|
||||
void
|
||||
void)
|
||||
(mktest "(raise #f)"
|
||||
|
||||
(mktest "(raise #f)"
|
||||
("uncaught exception: #f"
|
||||
"uncaught exception: #f"
|
||||
"uncaught exception: #f"
|
||||
|
@ -221,7 +218,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(values 1 2)"
|
||||
|
||||
("1\n2"
|
||||
"1\n2"
|
||||
"1\n2"
|
||||
|
@ -233,7 +229,6 @@ This produces an ACK message
|
|||
void
|
||||
void)
|
||||
(mktest "(list 1 2)"
|
||||
|
||||
("(1 2)"
|
||||
"(1 2)"
|
||||
"(1 2)"
|
||||
|
@ -246,7 +241,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(parameterize ([print-struct #t])(define-struct s (x) (make-inspector))(printf \"~s\\n\" (make-s 1)))"
|
||||
|
||||
("#(struct:s 1)"
|
||||
"#(struct:s 1)"
|
||||
"#(struct:s 1)"
|
||||
|
@ -260,20 +254,18 @@ This produces an ACK message
|
|||
|
||||
;; top-level semantics test
|
||||
(mktest "(define (f) (+ 1 1)) (define + -) (f)"
|
||||
|
||||
("define-values: cannot change constant variable: +"
|
||||
"define-values: cannot change constant variable: +"
|
||||
"define-values: cannot change constant variable: +"
|
||||
"define-values: cannot change constant variable: +"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: define-values: cannot change constant variable: \\+"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: define-values: cannot change constant variable: \\+")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: define-values: cannot change constant variable: \\+"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: define-values: cannot change constant variable: \\+")
|
||||
'interactions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest "(begin (define-struct a ()) (define-struct (b a) ()))"
|
||||
|
||||
(""
|
||||
""
|
||||
""
|
||||
|
@ -286,7 +278,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(begin (values) 1)"
|
||||
|
||||
("1"
|
||||
"1"
|
||||
"1"
|
||||
|
@ -299,13 +290,12 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(begin xx (printf \"hi\\n\"))"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:7: reference to undefined identifier: xx"
|
||||
((err-prefix "reference to undefined identifier: xx")
|
||||
(err-prefix "reference to undefined identifier: xx")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:7: reference to undefined identifier: xx")
|
||||
"reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -317,12 +307,12 @@ This produces an ACK message
|
|||
"(require 'n)\n"
|
||||
"s")
|
||||
|
||||
("{stop-22x22.png} compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1"
|
||||
"{stop-22x22.png} compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:43: compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1"
|
||||
"{stop-22x22.png} compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1"
|
||||
"{stop-multi.png} {stop-22x22.png} compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:43: compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1")
|
||||
((err-prefix "compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1")
|
||||
(err-prefix "compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:43: compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1")
|
||||
(err-prefix "compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1")
|
||||
(err-prefix "compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:43: compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1"))
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -331,7 +321,6 @@ This produces an ACK message
|
|||
|
||||
;; leading comment test
|
||||
(mktest "#!/bin/sh\n1"
|
||||
|
||||
("1"
|
||||
"1"
|
||||
"1"
|
||||
|
@ -344,13 +333,12 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "#!/bin/sh\nxx"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:2:0: reference to undefined identifier: xx"
|
||||
((err-prefix "reference to undefined identifier: xx")
|
||||
(err-prefix "reference to undefined identifier: xx")
|
||||
(err-prefix "repl-test-tmp3.rkt:2:0: reference to undefined identifier: xx")
|
||||
"reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -359,7 +347,6 @@ This produces an ACK message
|
|||
;; eval tests
|
||||
|
||||
(mktest " (eval '(values 1 2))"
|
||||
|
||||
("1\n2"
|
||||
"1\n2"
|
||||
"1\n2"
|
||||
|
@ -372,7 +359,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest " (eval '(list 1 2))"
|
||||
|
||||
("(1 2)"
|
||||
"(1 2)"
|
||||
"(1 2)"
|
||||
|
@ -385,46 +371,42 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest " (eval '(lambda ()))"
|
||||
|
||||
("{stop-multi.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} lambda: bad syntax in: (lambda ())"
|
||||
"lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} lambda: bad syntax in: (lambda ())")
|
||||
((err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())")
|
||||
(err-prefix "lambda: bad syntax in: (lambda ())"))
|
||||
'interactions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest " (read (open-input-string \".\"))"
|
||||
|
||||
("{stop-multi.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} read: illegal use of \".\""
|
||||
"read: illegal use of \".\""
|
||||
"{stop-multi.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} read: illegal use of \".\"")
|
||||
((err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\"")
|
||||
(err-prefix "read: illegal use of \".\""))
|
||||
'interactions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest " (eval 'x)"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-multi.png} {stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:4: reference to undefined identifier: x"
|
||||
((err-prefix "reference to undefined identifier: x")
|
||||
(err-prefix "reference to undefined identifier: x")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:4: reference to undefined identifier: x")
|
||||
"reference to undefined identifier: x"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest "(eval (box 1))"
|
||||
|
||||
("#&1"
|
||||
"#&1"
|
||||
"#&1"
|
||||
|
@ -437,7 +419,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(eval '(box 1))"
|
||||
|
||||
("#&1"
|
||||
"#&1"
|
||||
"#&1"
|
||||
|
@ -451,13 +432,12 @@ This produces an ACK message
|
|||
|
||||
; printer setup test
|
||||
(mktest "(expt 3 (void))"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #<void>"
|
||||
"{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #<void>"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: expt: expected argument of type <number>; given #<void>"
|
||||
((err-prefix "expt: expected argument of type <number>; given #<void>")
|
||||
(err-prefix "expt: expected argument of type <number>; given #<void>")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:0: expt: expected argument of type <number>; given #<void>")
|
||||
"expt: expected argument of type <number>; given #<void>"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #<void>"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #<void>")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #<void>"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #<void>")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -465,55 +445,50 @@ This produces an ACK message
|
|||
|
||||
;; error in the middle
|
||||
(mktest "1 2 ( 3 4"
|
||||
|
||||
("1\n2\n{stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:4: read: expected a `)' to close `('"
|
||||
"1\n2\n{stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} read: expected a `)' to close `('"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:4: read: expected a `)' to close `('")
|
||||
(err-prefix "read: expected a `)' to close `('")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:4: read: expected a `)' to close `('")
|
||||
#rx"1\n2\n({[^}]*}|){stop-22x22.png} read: expected a `[)]' to close `[(]'"
|
||||
(err-prefix "read: expected a `)' to close `('")
|
||||
(err-prefix "repl-test-tmp3.rkt:1:4: read: expected a `)' to close `('"))
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
(mktest "1 2 . 3 4"
|
||||
|
||||
("1\n2\n{stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:4: read: illegal use of \".\""
|
||||
(#rx"1\n2\n({[^}]*}|){stop-22x22.png} read: illegal use of \"[.]\""
|
||||
"{stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:4: read: illegal use of \".\""
|
||||
"1\n2\n{stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:4: read: illegal use of \".\"")
|
||||
"{stop-22x22.png} read: illegal use of \".\""
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:4: read: illegal use of \".\"")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
(mktest "1 2 (lambda ()) 3 4"
|
||||
|
||||
("1\n2\n{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:4: lambda: bad syntax in: (lambda ())"
|
||||
"1\n2\n{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} {stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:4: lambda: bad syntax in: (lambda ())")
|
||||
"{stop-22x22.png} lambda: bad syntax in: (lambda ())"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:4: lambda: bad syntax in: (lambda ())")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
(mktest "1 2 x 3 4"
|
||||
|
||||
("1\n2\n{stop-multi.png} {stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-multi.png} {stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:4: reference to undefined identifier: x"
|
||||
("1\n2\n{stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:4: reference to undefined identifier: x"
|
||||
"1\n2\nreference to undefined identifier: x"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: x")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
(mktest "1 2 (raise 1) 3 4"
|
||||
|
||||
("1\n2\nuncaught exception: 1"
|
||||
"uncaught exception: 1"
|
||||
"uncaught exception: 1"
|
||||
|
@ -525,7 +500,6 @@ This produces an ACK message
|
|||
void
|
||||
void)
|
||||
(mktest "1 2 (raise #f) 3 4"
|
||||
|
||||
("1\n2\nuncaught exception: #f"
|
||||
"uncaught exception: #f"
|
||||
"uncaught exception: #f"
|
||||
|
@ -538,28 +512,25 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(require lang/htdp-beginner)\n(cond [1 2 3 4])"
|
||||
|
||||
("{stop-22x22.png} cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4"
|
||||
"{stop-22x22.png} cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:2:7: cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4"
|
||||
"{stop-multi.png} {stop-22x22.png} cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4"
|
||||
"{stop-multi.png} {stop-22x22.png} cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:2:7: cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4")
|
||||
"{stop-22x22.png} cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4"
|
||||
"{stop-22x22.png} cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:2:7: cond: expected a clause with a question and an answer, but found a clause with 4 parts in:\n 1\n 2\n 3\n 4")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
;; error across separate files
|
||||
(mktest
|
||||
"(load \"repl-test-tmp2.rkt\") (define (g) (+ 1 (expt 3 #f))) (f g)"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:45: expt: expected argument of type <number>; given #f"
|
||||
"{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:28: expt: expected argument of type <number>; given #f")
|
||||
(mktest "(load \"repl-test-tmp2.rkt\") (define (g) (+ 1 (expt 3 #f))) (f g)"
|
||||
("{stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:45: expt: expected argument of type <number>; given #f"
|
||||
"{stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-22x22.png} expt: expected argument of type <number>; given #f"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:28: expt: expected argument of type <number>; given #f")
|
||||
'definitions
|
||||
#f
|
||||
(λ ()
|
||||
|
@ -572,26 +543,24 @@ This produces an ACK message
|
|||
|
||||
;; new namespace test
|
||||
(mktest "(current-namespace (make-namespace))\nif"
|
||||
|
||||
("{stop-22x22.png} if: bad syntax in: if"
|
||||
"{stop-22x22.png} if: bad syntax in: if"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:2:0: if: bad syntax in: if"
|
||||
"{stop-22x22.png} if: bad syntax in: if"
|
||||
"{stop-multi.png} {stop-22x22.png} if: bad syntax in: if"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:2:0: if: bad syntax in: if")
|
||||
"{stop-22x22.png} if: bad syntax in: if"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:2:0: if: bad syntax in: if")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
void)
|
||||
|
||||
(mktest "(current-namespace (make-namespace 'empty))\nif"
|
||||
|
||||
("{stop-22x22.png} compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction"
|
||||
"{stop-22x22.png} compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:2:0: compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction"
|
||||
"{stop-22x22.png} compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction"
|
||||
"{stop-multi.png} {stop-22x22.png} compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:2:0: compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction")
|
||||
"{stop-22x22.png} compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:2:0: compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -599,7 +568,6 @@ This produces an ACK message
|
|||
|
||||
;; macro tests
|
||||
(mktest "(define-syntax (c stx) (syntax-case stx () [(_ p q r) (syntax (+ p q r))]))"
|
||||
|
||||
(""
|
||||
""
|
||||
""
|
||||
|
@ -614,13 +582,12 @@ This produces an ACK message
|
|||
;; error escape handler test
|
||||
(mktest
|
||||
"(let ([old (error-escape-handler)])\n(+ (let/ec k\n(dynamic-wind\n(lambda () (error-escape-handler (lambda () (k 5))))\n(lambda () (expt 3 #f))\n(lambda () (error-escape-handler old))))\n10))"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #f\n15"
|
||||
"{stop-multi.png} {stop-22x22.png} expt: expected argument of type <number>; given #f\n15"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:5:19: expt: expected argument of type <number>; given #f\n15"
|
||||
("{stop-22x22.png} expt: expected argument of type <number>; given #f\n15"
|
||||
"{stop-22x22.png} expt: expected argument of type <number>; given #f\n15"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:5:19: expt: expected argument of type <number>; given #f\n15"
|
||||
"expt: expected argument of type <number>; given #f\n15"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #f\n15"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #f\n15")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #f\n15"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: expt: expected argument of type <number>; given #f\n15")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -656,7 +623,6 @@ This produces an ACK message
|
|||
|
||||
;; make sure syntax objects only go into good ports
|
||||
(mktest "(define-syntax (foo stx) (with-handlers ([exn:fail? (lambda (x) #'10)]) (syntax-local-value #'foot))) (foo)"
|
||||
|
||||
("10"
|
||||
"10"
|
||||
"10"
|
||||
|
@ -670,7 +636,6 @@ This produces an ACK message
|
|||
|
||||
;; make sure syntax objects don't go into bad ports
|
||||
(mktest "(parameterize ([current-output-port (open-output-string)]) (write #'1))"
|
||||
|
||||
(""
|
||||
""
|
||||
""
|
||||
|
@ -683,7 +648,6 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(parameterize ([current-output-port (open-output-string)]) (fprintf (current-error-port) \"~e\" #'foot))"
|
||||
|
||||
(#rx"#<syntax:.*repl-test-tmp.rkt:1:96.*>"
|
||||
#rx"#<syntax:.*repl-test-tmp.rkt:1:96.*>"
|
||||
#rx"#<syntax:.*repl-test-tmp3.rkt:1:96.*>"
|
||||
|
@ -697,7 +661,6 @@ This produces an ACK message
|
|||
|
||||
|
||||
(mktest "(write-special 1)"
|
||||
|
||||
("1#t"
|
||||
"1#t"
|
||||
"1#t"
|
||||
|
@ -713,7 +676,6 @@ This produces an ACK message
|
|||
;; the begin/void combo is to make sure that no value printout
|
||||
;; comes and messes up the source location for the error.
|
||||
"(define s (make-semaphore 0))\n(queue-callback\n(lambda ()\n(dynamic-wind\nvoid\n(lambda () (expt 3 #f))\n(lambda () (semaphore-post s)))))\n(begin (yield s) (void))"
|
||||
|
||||
(#rx"expt: expected argument of type <number>; given #f"
|
||||
#rx"expt: expected argument of type <number>; given #f"
|
||||
#rx"expt: expected argument of type <number>; given #f"
|
||||
|
@ -753,7 +715,6 @@ This produces an ACK message
|
|||
|
||||
;; continuation tests
|
||||
(mktest "(define k (call/cc (lambda (x) x)))\n(k 17)\nk"
|
||||
|
||||
("17"
|
||||
"17"
|
||||
"17"
|
||||
|
@ -765,7 +726,6 @@ This produces an ACK message
|
|||
void
|
||||
void)
|
||||
(mktest "(define v (vector (call/cc (lambda (x) x))))\n((vector-ref v 0) 2)\nv"
|
||||
|
||||
("#(2)"
|
||||
"#(2)"
|
||||
"#(2)"
|
||||
|
@ -777,7 +737,6 @@ This produces an ACK message
|
|||
void
|
||||
void)
|
||||
(mktest "(define v (vector (eval '(call/cc (lambda (x) x)))))\n((vector-ref v 0) 2)\nv"
|
||||
|
||||
("#(2)"
|
||||
"#(2)"
|
||||
"#(2)"
|
||||
|
@ -790,13 +749,12 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest "(define x 1)\n((λ (x y) y) (set! x (call/cc (lambda (x) x)))\n(x 3))"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
"{stop-multi.png} {stop-22x22.png} procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:3:13: procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
("{stop-22x22.png} procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
"{stop-22x22.png} procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:3:13: procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
"procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -804,7 +762,6 @@ This produces an ACK message
|
|||
|
||||
;; top-level & continuation interaction test
|
||||
(mktest "(begin (define k (call/cc (λ (x) x)))\n(define x 'wrong))\n(set! x 'right)\n(k 1)\nx"
|
||||
|
||||
("right"
|
||||
"right"
|
||||
"right"
|
||||
|
@ -825,7 +782,6 @@ This produces an ACK message
|
|||
10)))
|
||||
(default-continuation-prompt-tag)
|
||||
list))
|
||||
|
||||
("(1 2 3)"
|
||||
"(1 2 3)"
|
||||
"(1 2 3)"
|
||||
|
@ -851,7 +807,6 @@ This produces an ACK message
|
|||
|
||||
;; graphical lambda tests
|
||||
(mktest (list "((" '("Insert" "Insert λ") "(x) x) 1)")
|
||||
|
||||
("1"
|
||||
"1"
|
||||
"1"
|
||||
|
@ -864,13 +819,12 @@ This produces an ACK message
|
|||
void)
|
||||
|
||||
(mktest (list "(" '("Insert" "Insert λ") "())")
|
||||
|
||||
("{stop-22x22.png} λ: bad syntax in: (λ ())"
|
||||
"{stop-22x22.png} λ: bad syntax in: (λ ())"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:0: λ: bad syntax in: (λ ())"
|
||||
"{stop-22x22.png} λ: bad syntax in: (λ ())"
|
||||
"{stop-multi.png} {stop-22x22.png} λ: bad syntax in: (λ ())"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: λ: bad syntax in: (λ ())")
|
||||
"{stop-22x22.png} λ: bad syntax in: (λ ())"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:0: λ: bad syntax in: (λ ())")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -878,10 +832,9 @@ This produces an ACK message
|
|||
|
||||
;; thread tests
|
||||
(mktest "(begin (thread (lambda () x)) (sleep 1/10))"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-multi.png} {stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:26: reference to undefined identifier: x"
|
||||
("{stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-22x22.png} reference to undefined identifier: x"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:26: reference to undefined identifier: x"
|
||||
"reference to undefined identifier: x"
|
||||
"reference to undefined identifier: x"
|
||||
"reference to undefined identifier: x")
|
||||
|
@ -892,13 +845,12 @@ This produces an ACK message
|
|||
|
||||
;; brought down from above for comparison
|
||||
(mktest "xx"
|
||||
|
||||
("{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-multi.png} {stop-22x22.png} repl-test-tmp3.rkt:1:0: reference to undefined identifier: xx"
|
||||
("{stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-22x22.png} reference to undefined identifier: xx"
|
||||
"{stop-22x22.png} repl-test-tmp3.rkt:1:0: reference to undefined identifier: xx"
|
||||
"reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-multi.png} {stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx"
|
||||
#rx"{stop-22x22.png} .*rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx")
|
||||
'definitions
|
||||
#f
|
||||
void
|
||||
|
@ -907,7 +859,6 @@ This produces an ACK message
|
|||
;; setup of the namespaces for pict printing (from slideshow)
|
||||
|
||||
(mktest "(require texpict/utils)(disk 3)"
|
||||
|
||||
("{image}"
|
||||
"{image}"
|
||||
"{image}"
|
||||
|
@ -925,7 +876,6 @@ This produces an ACK message
|
|||
(current-namespace (make-namespace))
|
||||
(namespace-set-variable-value! 'd (disk 3)))
|
||||
'd)
|
||||
|
||||
("#<pict>"
|
||||
"#<pict>"
|
||||
"#<pict>"
|
||||
|
@ -943,7 +893,6 @@ This produces an ACK message
|
|||
(namespace-attach-module on n))
|
||||
'(require texpict/utils)
|
||||
'(disk 3))
|
||||
|
||||
("{image}"
|
||||
"{image}"
|
||||
"{image}"
|
||||
|
@ -959,7 +908,6 @@ This produces an ACK message
|
|||
"(require mzlib/pretty)"
|
||||
"(pretty-print-print-hook (lambda x (expt 3 #f)))"
|
||||
"(list 1 2 3)")
|
||||
|
||||
("(1 2 3)"
|
||||
"(1 2 3)"
|
||||
"(1 2 3)"
|
||||
|
@ -974,7 +922,6 @@ This produces an ACK message
|
|||
(mktest (format "~s\n~s"
|
||||
`(require scheme/pretty)
|
||||
`(parameterize ((pretty-print-exact-as-decimal #t)) (display 1/4)))
|
||||
|
||||
("1/4"
|
||||
"1/4"
|
||||
"1/4"
|
||||
|
@ -998,7 +945,6 @@ This produces an ACK message
|
|||
"(with-handlers ((void values)) (eval '(lambda ())))))\n"
|
||||
"(lambda ()\n"
|
||||
"(display (get-output-string p)))))\n")
|
||||
|
||||
("x in: (lambda ())"
|
||||
"x in: (lambda ())"
|
||||
"x in: (lambda ())"
|
||||
|
|
Loading…
Reference in New Issue
Block a user