.
original commit: edb9e1c23ac6b88788446490fc38aa7b0c7af9a0
This commit is contained in:
parent
13a88eac98
commit
0351f97bc2
25
collects/tests/mzscheme/restart.ss
Normal file
25
collects/tests/mzscheme/restart.ss
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
(load-relative "loadtest.ss")
|
||||
|
||||
(require (lib "restart.ss"))
|
||||
|
||||
(SECTION 'restart)
|
||||
|
||||
(test #t restart-mzscheme #("ignore-me") values #("-qmv") void)
|
||||
(let ([test-in-out
|
||||
(lambda (pre post in out)
|
||||
(test (string-append "> " out "\n> ")
|
||||
'result
|
||||
(let ([s (open-output-string)])
|
||||
(parameterize ([current-input-port (open-input-string in)]
|
||||
[current-output-port s])
|
||||
(restart-mzscheme pre values post void)
|
||||
(get-output-string s)))))])
|
||||
(test-in-out #("ignore-me") #("-qm") "(current-command-line-arguments)" "#0()")
|
||||
(test-in-out #("") #("-qm") "'Hello" "hello")
|
||||
(test-in-out #("-g") #("-qm") "'Hello" "Hello")
|
||||
(test-in-out #("") #("-qmg") "'Hello" "Hello"))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(report-errs)
|
Loading…
Reference in New Issue
Block a user