diff --git a/tests/browser-harness.rkt b/tests/browser-harness.rkt index 09650e1..6e09168 100644 --- a/tests/browser-harness.rkt +++ b/tests/browser-harness.rkt @@ -16,6 +16,7 @@ racket/runtime-path racket/runtime-path (for-syntax racket/base + racket/path racket/port)) (define evaluate (make-evaluate @@ -62,14 +63,19 @@ EOF (define-syntax (test stx) (syntax-case stx () - [(_ source-file-path expected-file-path) + [(_ original-source-file-path expected-file-path) (with-syntax ([stx stx] - [exp (call-with-input-file (syntax-e #'expected-file-path) - port->string)]) + [source-file-path (parameterize ([current-directory + (current-load-relative-directory)]) + (normalize-path (syntax-e #'original-source-file-path)))] + [exp (parameterize ([current-directory + (current-load-relative-directory)]) + (call-with-input-file (syntax-e #'expected-file-path) + port->string))]) (quasisyntax/loc #'stx (begin - (printf "running test on ~s..." source-file-path) - (let* ([src-path (normalize-path source-file-path)] + (printf "running test on ~s..." original-source-file-path) + (let* ([src-path source-file-path] [result (evaluate (make-MainModuleSource (make-ModuleSource src-path)))] [output (evaluated-stdout result)]) (cond [(string=? output exp) diff --git a/tests/more-tests/run-more-tests.rkt b/tests/more-tests/run-more-tests.rkt index 95d2da9..b8a92d5 100644 --- a/tests/more-tests/run-more-tests.rkt +++ b/tests/more-tests/run-more-tests.rkt @@ -3,4 +3,4 @@ (require "../browser-harness.rkt") (test "hello.rkt" "hello.expected") -(test "simple-structs.rkt" "simple-structs.expected") \ No newline at end of file +#;(test "simple-structs.rkt" "simple-structs.expected") \ No newline at end of file