raco exe: adjust tests to avoid "stdout" in source directory

This commit is contained in:
Matthew Flatt 2014-06-03 09:09:13 +01:00
parent a011f9b816
commit 0b5fbc17c9
30 changed files with 31 additions and 31 deletions

View File

@ -1,5 +1,5 @@
(module embed-me1 mzscheme
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1\n"))
'append))

View File

@ -1,7 +1,7 @@
(module embed-me10 mzscheme
(require openssl/mzssl)
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "~a\n" ssl-available?))
'append))

View File

@ -4,7 +4,7 @@
(define (*read port)
`(module embed-me11 mzscheme
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf ,(read port)
;; Use `getenv' at read time!!!

View File

@ -4,7 +4,7 @@
(define (*read port)
`(module embed-me11 mzscheme
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf ,(read port)
;; Use `getenv' at read time!!!

View File

@ -1,5 +1,5 @@
#lang racket/base
(require "embed-me13.rkt")
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 14\n"))
#:exists 'append)

View File

@ -1,5 +1,5 @@
#lang racket/base
(require (submod "embed-me15-one.rkt" one))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is ~a.\n" (+ 9 one two three)))
#:exists 'append)

View File

@ -2,6 +2,6 @@
;; a `main' submodule:
(module main racket/base
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 16.\n"))
#:exists 'append))

View File

@ -4,6 +4,6 @@
(lambda () (printf "This is 17.\n")))
(module+ sub
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
print-17
#:exists 'append))

View File

@ -1,5 +1,5 @@
#lang racket/base
(require (submod tests/compiler/embed/embed-me18a sub))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(dynamic-require '(submod tests/compiler/embed/embed-me18a sub) 'print-18)
#:exists 'append)

View File

@ -9,6 +9,6 @@
(namespace-require 'racket/base)
(eval (read (open-input-string "#lang plai 10"))))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 19.\n"))
#:exists 'append)

View File

@ -3,7 +3,7 @@
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "icons/file.gif"))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1b\n"))
#:exists 'append)

View File

@ -3,7 +3,7 @@
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "etc.ss")) ; in mzlib
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1c\n"))
#:exists 'append)

View File

@ -3,6 +3,6 @@
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "file.gif" "icons"))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1d\n"))
#:exists 'append)

View File

@ -3,6 +3,6 @@
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "html"))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1e\n"))
#:exists 'append)

View File

@ -6,7 +6,7 @@
(define-runtime-path f1 "embed-me1f1.rktl")
(define-runtime-path f2 "sub/embed-me1f2.rktl")
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (parameterize ([current-namespace (make-base-namespace)])
(load f1)))
#:exists 'append)

View File

@ -1,6 +1,6 @@
(module embed-me2 mzscheme
(require "embed-me1.ss"
mzlib/etc)
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 2: ~a\n" true))
'append))

View File

@ -2,6 +2,6 @@
;; like "embed-me16.rkt" using `module+'
(module+ main
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 20.\n"))
#:exists 'append))

View File

@ -7,6 +7,6 @@
(match "x"
[(pregexp "x")
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 21.\n"))
#:exists 'append)])

View File

@ -1,6 +1,6 @@
(module embed-me3 mzscheme
(require mzlib/etc)
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "3 is here, too? ~a\n" true))
'append))

View File

@ -1,6 +1,6 @@
(module embed-me5 mzscheme
(require mred)
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 5: ~s\n" button%))
'append))

View File

@ -1,5 +1,5 @@
(module embed-me6 mzscheme
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "This is 6\n")
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])

View File

@ -1,5 +1,5 @@
(module embed-me6b racket/base
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "This is 6\n")
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])

View File

@ -1,6 +1,6 @@
(module embed-me9 mzscheme
(require "embed-me8.ss")
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "~a\n" (ex)))
'append)

View File

@ -1,6 +1,6 @@
#lang racket/base
(require "main.rkt")
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
#:exists 'append
(lambda () (displayln "alt")))

View File

@ -1,7 +1,7 @@
#lang racket/base
(require (submod (planet racket-tester/p1/has-sub) the-sub))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
#:exists 'append
(lambda () (displayln (dynamic-require
'(submod (planet racket-tester/p1/has-sub) the-sub)

View File

@ -1,4 +1,4 @@
#lang racket/base
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (displayln "one")))

View File

@ -1,6 +1,6 @@
#lang racket/base
(require (planet racket-tester/p2))
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
#:exists 'append
(lambda () (displayln "other")))

View File

@ -1,5 +1,5 @@
#lang racket/base
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (displayln "two")))

View File

@ -1,6 +1,6 @@
#lang racket/base
(require "../main.ss")
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
#:exists 'append
(lambda () (displayln "sub")))

View File

@ -219,7 +219,7 @@
(list
tmp
(build-path (collection-path "tests" "compiler" "embed") "embed-me4.rktl"))
`(with-output-to-file "stdout"
`(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (display "... and more!\n"))
'append)
`(,(flags "l") ,(string-append "tests/compiler/embed/" filename)))
@ -256,7 +256,7 @@
'(begin
(require scheme/base)
(eval '(define (out s)
(with-output-to-file "stdout"
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf s))
#:exists 'append)))
(out "\uA9, \u7238, and \U1D670\n")))