Cleaning up cwd access for DrDr
svn: r16373
This commit is contained in:
parent
0bd8b828e9
commit
fba54e27af
|
@ -29,6 +29,7 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require
|
||||
scheme/runtime-path
|
||||
(lib "list.ss" "srfi" "1")
|
||||
(file "check.ss")
|
||||
(file "result.ss")
|
||||
|
@ -50,6 +51,8 @@
|
|||
(define-check (bad)
|
||||
(fail-check))
|
||||
|
||||
(define-runtime-path check-file "check.ss")
|
||||
|
||||
(define check-tests
|
||||
(test-suite
|
||||
"Check tests"
|
||||
|
@ -288,7 +291,7 @@
|
|||
(cns (current-namespace)))
|
||||
(parameterize ((current-namespace destns))
|
||||
(namespace-require '(for-syntax scheme/base))
|
||||
(namespace-require '(file "check.ss"))
|
||||
(namespace-require `(file ,(path->string check-file)))
|
||||
;; First check that the right check macro got
|
||||
;; used: ie that it didn't just compile the thing
|
||||
;; as an application.
|
||||
|
@ -303,7 +306,7 @@
|
|||
;; is writable
|
||||
(let ((stx-string "(check = 1 2)"))
|
||||
(write (compile (read-syntax
|
||||
(string->path "file")
|
||||
check-file
|
||||
(open-input-string stx-string)))
|
||||
(open-output-string))))))
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
(require (for-syntax scheme/base))
|
||||
|
||||
(require srfi/1
|
||||
(require scheme/runtime-path
|
||||
srfi/1
|
||||
srfi/13)
|
||||
|
||||
(require (file "test.ss")
|
||||
|
@ -24,6 +25,8 @@
|
|||
"Example 3"
|
||||
#t)))
|
||||
|
||||
(define-runtime-path test-file "test.ss")
|
||||
|
||||
(define-check (check-test-results test successes failures errors)
|
||||
(let ((results (run-test test)))
|
||||
(check = (length results) (+ successes failures errors))
|
||||
|
@ -44,7 +47,7 @@
|
|||
(let ((destns (make-base-namespace))
|
||||
(cns (current-namespace)))
|
||||
(parameterize ((current-namespace destns))
|
||||
(namespace-require '(file "test.ss"))
|
||||
(namespace-require `(file ,(path->string test-file)))
|
||||
(check-exn (lambda (e)
|
||||
(check-pred exn:fail:syntax? e)
|
||||
(check string-contains (exn-message e) msg))
|
||||
|
|
Loading…
Reference in New Issue
Block a user