Added new directory for planet tests; restored #lang planet test in lang.ss
svn: r12206
This commit is contained in:
parent
d1adec4bc6
commit
2949809542
5
collects/tests/planet/examples/dummy-module.ss
Normal file
5
collects/tests/planet/examples/dummy-module.ss
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang planet plt/dummy-package
|
||||
|
||||
successful
|
||||
test
|
||||
result
|
|
@ -0,0 +1,2 @@
|
|||
(module reader syntax/module-reader
|
||||
#:language '(planet plt/dummy-package))
|
11
collects/tests/planet/examples/dummy-package/main.ss
Normal file
11
collects/tests/planet/examples/dummy-package/main.ss
Normal file
|
@ -0,0 +1,11 @@
|
|||
#lang scheme
|
||||
|
||||
(define-syntax (module-begin stx)
|
||||
(syntax-case stx ()
|
||||
[(_ term ...)
|
||||
(syntax/loc stx
|
||||
(#%module-begin
|
||||
(define result '(term ...))
|
||||
(provide result)))]))
|
||||
|
||||
(provide (rename-out [module-begin #%module-begin]))
|
26
collects/tests/planet/lang.ss
Normal file
26
collects/tests/planet/lang.ss
Normal file
|
@ -0,0 +1,26 @@
|
|||
(load-relative "../mzscheme/loadtest.ss")
|
||||
|
||||
(Section 'planet)
|
||||
|
||||
(require planet/util
|
||||
scheme/contract)
|
||||
|
||||
;; Testing: #lang planet
|
||||
|
||||
(test (void)
|
||||
'add-hard-link
|
||||
(with-handlers ([exn:fail? values])
|
||||
(add-hard-link "plt" "dummy-package.plt" 1 0
|
||||
(string->path "examples/dummy-package"))))
|
||||
|
||||
(test '(successful test result)
|
||||
'hash-lang-planet
|
||||
(with-handlers ([exn:fail? values])
|
||||
(dynamic-require "examples/dummy-module.ss" 'result)))
|
||||
|
||||
(test (void)
|
||||
'remove-hard-link
|
||||
(with-handlers ([exn:fail? values])
|
||||
(remove-hard-link "plt" "dummy-package.plt" 1 0)))
|
||||
|
||||
(report-errs)
|
Loading…
Reference in New Issue
Block a user