raco exe: adjust tests to avoid "stdout" in source directory
This commit is contained in:
parent
a011f9b816
commit
0b5fbc17c9
|
@ -1,5 +1,5 @@
|
||||||
(module embed-me1 mzscheme
|
(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"))
|
(lambda () (printf "This is 1\n"))
|
||||||
'append))
|
'append))
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(module embed-me10 mzscheme
|
(module embed-me10 mzscheme
|
||||||
(require openssl/mzssl)
|
(require openssl/mzssl)
|
||||||
|
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "~a\n" ssl-available?))
|
(printf "~a\n" ssl-available?))
|
||||||
'append))
|
'append))
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
(define (*read port)
|
(define (*read port)
|
||||||
`(module embed-me11 mzscheme
|
`(module embed-me11 mzscheme
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf ,(read port)
|
(printf ,(read port)
|
||||||
;; Use `getenv' at read time!!!
|
;; Use `getenv' at read time!!!
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
(define (*read port)
|
(define (*read port)
|
||||||
`(module embed-me11 mzscheme
|
`(module embed-me11 mzscheme
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf ,(read port)
|
(printf ,(read port)
|
||||||
;; Use `getenv' at read time!!!
|
;; Use `getenv' at read time!!!
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require "embed-me13.rkt")
|
(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"))
|
(lambda () (printf "This is 14\n"))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require (submod "embed-me15-one.rkt" one))
|
(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)))
|
(lambda () (printf "This is ~a.\n" (+ 9 one two three)))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
;; a `main' submodule:
|
;; a `main' submodule:
|
||||||
(module main racket/base
|
(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"))
|
(lambda () (printf "This is 16.\n"))
|
||||||
#:exists 'append))
|
#:exists 'append))
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
(lambda () (printf "This is 17.\n")))
|
(lambda () (printf "This is 17.\n")))
|
||||||
|
|
||||||
(module+ sub
|
(module+ sub
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
print-17
|
print-17
|
||||||
#:exists 'append))
|
#:exists 'append))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require (submod tests/compiler/embed/embed-me18a sub))
|
(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)
|
(dynamic-require '(submod tests/compiler/embed/embed-me18a sub) 'print-18)
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
(namespace-require 'racket/base)
|
(namespace-require 'racket/base)
|
||||||
(eval (read (open-input-string "#lang plai 10"))))
|
(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"))
|
(lambda () (printf "This is 19.\n"))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
(require scheme/runtime-path
|
(require scheme/runtime-path
|
||||||
(for-syntax scheme/base))
|
(for-syntax scheme/base))
|
||||||
(define-runtime-path file '(lib "icons/file.gif"))
|
(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"))
|
(lambda () (printf "This is 1b\n"))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
(require scheme/runtime-path
|
(require scheme/runtime-path
|
||||||
(for-syntax scheme/base))
|
(for-syntax scheme/base))
|
||||||
(define-runtime-path file '(lib "etc.ss")) ; in mzlib
|
(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"))
|
(lambda () (printf "This is 1c\n"))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
(require scheme/runtime-path
|
(require scheme/runtime-path
|
||||||
(for-syntax scheme/base))
|
(for-syntax scheme/base))
|
||||||
(define-runtime-path file '(lib "file.gif" "icons"))
|
(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"))
|
(lambda () (printf "This is 1d\n"))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
(require scheme/runtime-path
|
(require scheme/runtime-path
|
||||||
(for-syntax scheme/base))
|
(for-syntax scheme/base))
|
||||||
(define-runtime-path file '(lib "html"))
|
(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"))
|
(lambda () (printf "This is 1e\n"))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
(define-runtime-path f1 "embed-me1f1.rktl")
|
(define-runtime-path f1 "embed-me1f1.rktl")
|
||||||
(define-runtime-path f2 "sub/embed-me1f2.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)])
|
(lambda () (parameterize ([current-namespace (make-base-namespace)])
|
||||||
(load f1)))
|
(load f1)))
|
||||||
#:exists 'append)
|
#:exists 'append)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(module embed-me2 mzscheme
|
(module embed-me2 mzscheme
|
||||||
(require "embed-me1.ss"
|
(require "embed-me1.ss"
|
||||||
mzlib/etc)
|
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))
|
(lambda () (printf "This is 2: ~a\n" true))
|
||||||
'append))
|
'append))
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
;; like "embed-me16.rkt" using `module+'
|
;; like "embed-me16.rkt" using `module+'
|
||||||
(module+ main
|
(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"))
|
(lambda () (printf "This is 20.\n"))
|
||||||
#:exists 'append))
|
#:exists 'append))
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
|
|
||||||
(match "x"
|
(match "x"
|
||||||
[(pregexp "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"))
|
(lambda () (printf "This is 21.\n"))
|
||||||
#:exists 'append)])
|
#:exists 'append)])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(module embed-me3 mzscheme
|
(module embed-me3 mzscheme
|
||||||
(require mzlib/etc)
|
(require mzlib/etc)
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "3 is here, too? ~a\n" true))
|
(printf "3 is here, too? ~a\n" true))
|
||||||
'append))
|
'append))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(module embed-me5 mzscheme
|
(module embed-me5 mzscheme
|
||||||
(require mred)
|
(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%))
|
(lambda () (printf "This is 5: ~s\n" button%))
|
||||||
'append))
|
'append))
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(module embed-me6 mzscheme
|
(module embed-me6 mzscheme
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "This is 6\n")
|
(printf "This is 6\n")
|
||||||
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
|
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(module embed-me6b racket/base
|
(module embed-me6b racket/base
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "This is 6\n")
|
(printf "This is 6\n")
|
||||||
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
|
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(module embed-me9 mzscheme
|
(module embed-me9 mzscheme
|
||||||
(require "embed-me8.ss")
|
(require "embed-me8.ss")
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "~a\n" (ex)))
|
(printf "~a\n" (ex)))
|
||||||
'append)
|
'append)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require "main.rkt")
|
(require "main.rkt")
|
||||||
|
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
#:exists 'append
|
#:exists 'append
|
||||||
(lambda () (displayln "alt")))
|
(lambda () (displayln "alt")))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require (submod (planet racket-tester/p1/has-sub) the-sub))
|
(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
|
#:exists 'append
|
||||||
(lambda () (displayln (dynamic-require
|
(lambda () (displayln (dynamic-require
|
||||||
'(submod (planet racket-tester/p1/has-sub) the-sub)
|
'(submod (planet racket-tester/p1/has-sub) the-sub)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda () (displayln "one")))
|
(lambda () (displayln "one")))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require (planet racket-tester/p2))
|
(require (planet racket-tester/p2))
|
||||||
|
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
#:exists 'append
|
#:exists 'append
|
||||||
(lambda () (displayln "other")))
|
(lambda () (displayln "other")))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
|
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda () (displayln "two")))
|
(lambda () (displayln "two")))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require "../main.ss")
|
(require "../main.ss")
|
||||||
|
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
#:exists 'append
|
#:exists 'append
|
||||||
(lambda () (displayln "sub")))
|
(lambda () (displayln "sub")))
|
||||||
|
|
|
@ -219,7 +219,7 @@
|
||||||
(list
|
(list
|
||||||
tmp
|
tmp
|
||||||
(build-path (collection-path "tests" "compiler" "embed") "embed-me4.rktl"))
|
(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"))
|
(lambda () (display "... and more!\n"))
|
||||||
'append)
|
'append)
|
||||||
`(,(flags "l") ,(string-append "tests/compiler/embed/" filename)))
|
`(,(flags "l") ,(string-append "tests/compiler/embed/" filename)))
|
||||||
|
@ -256,7 +256,7 @@
|
||||||
'(begin
|
'(begin
|
||||||
(require scheme/base)
|
(require scheme/base)
|
||||||
(eval '(define (out s)
|
(eval '(define (out s)
|
||||||
(with-output-to-file "stdout"
|
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||||
(lambda () (printf s))
|
(lambda () (printf s))
|
||||||
#:exists 'append)))
|
#:exists 'append)))
|
||||||
(out "\uA9, \u7238, and \U1D670\n")))
|
(out "\uA9, \u7238, and \U1D670\n")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user