~ chicken-core (chicken-5) c238e8e9f349f09e5ed59fb7deec3801ae16d567


commit c238e8e9f349f09e5ed59fb7deec3801ae16d567
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Fri Aug 24 11:02:50 2018 +1200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Sat Aug 25 05:25:56 2018 +1200

    Suffix test debris with ".out" to simplify testclean target

diff --git a/rules.make b/rules.make
index 0fcc1260..89bd462e 100644
--- a/rules.make
+++ b/rules.make
@@ -952,7 +952,8 @@ testclean:
 	  $(SRCDIR)tests$(SEP)*.out \
 	  $(SRCDIR)tests$(SEP)*.profile \
 	  $(SRCDIR)tests$(SEP)*.so \
-	  $(SRCDIR)tests$(SEP)tmp* \
+	  $(SRCDIR)tests$(SEP)tmp \
+	  $(SRCDIR)tests$(SEP)tmp.c \
 	  $(SRCDIR)tests$(SEP)empty-file \
 	  $(SRCDIR)tests$(SEP)null \
 	  $(SRCDIR)tests$(SEP)null.c \
diff --git a/tests/ec-tests.scm b/tests/ec-tests.scm
index 71e9f81e..faa06e1f 100644
--- a/tests/ec-tests.scm
+++ b/tests/ec-tests.scm
@@ -292,19 +292,19 @@
 
 (my-check 
  (begin
-   (let ((f (my-open-output-file "tmp1")))
+   (let ((f (my-open-output-file "tmp1.out")))
      (do-ec (:range n 10) (begin (write n f) (newline f)))
      (close-output-port f))
-   (my-call-with-input-file "tmp1"
+   (my-call-with-input-file "tmp1.out"
     (lambda (port) (list-ec (:port x port read) x)) ))
  => (list-ec (:range n 10) n) )
 
 (my-check 
  (begin
-   (let ((f (my-open-output-file "tmp1")))
+   (let ((f (my-open-output-file "tmp1.out")))
      (do-ec (:range n 10) (begin (write n f) (newline f)))
      (close-output-port f))
-   (my-call-with-input-file "tmp1"                 
+   (my-call-with-input-file "tmp1.out"
      (lambda (port) (list-ec (:port x port) x)) ))
  => (list-ec (:range n 10) n) )
 
@@ -441,19 +441,19 @@
 
 (my-check 
  (begin
-   (let ((f (my-open-output-file "tmp1")))
+   (let ((f (my-open-output-file "tmp1.out")))
      (do-ec (:range n 10) (begin (write n f) (newline f)))
      (close-output-port f))
-   (my-call-with-input-file "tmp1"                 
+   (my-call-with-input-file "tmp1.out"
      (lambda (port) (list-ec (: x port read) x)) ))
  => (list-ec (:range n 10) n) )
     
 (my-check 
  (begin
-   (let ((f (my-open-output-file "tmp1")))
+   (let ((f (my-open-output-file "tmp1.out")))
      (do-ec (:range n 10) (begin (write n f) (newline f)))
      (close-output-port f))
-   (my-call-with-input-file "tmp1"                 
+   (my-call-with-input-file "tmp1.out"
      (lambda (port) (list-ec (: x port) x)) ))
  => (list-ec (:range n 10) n) )
 
@@ -484,10 +484,10 @@
 
 (my-check 
  (begin
-   (let ((f (my-open-output-file "tmp1")))
+   (let ((f (my-open-output-file "tmp1.out")))
      (do-ec (:range n 10) (begin (write n f) (newline f)))
      (close-output-port f))
-   (my-call-with-input-file "tmp1"
+   (my-call-with-input-file "tmp1.out"
      (lambda (port) (list-ec (: x (index i) port) (list x i))) ))
  => '((0 0) (1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7) (8 8) (9 9)) )
 
@@ -629,10 +629,10 @@
 
 (my-check
  (begin
-   (let ((f (my-open-output-file "tmp1")))
+   (let ((f (my-open-output-file "tmp1.out")))
      (do-ec (:range n 10) (begin (write n f) (newline f)))
      (close-output-port f))
-   (read-lines "tmp1") )
+   (read-lines "tmp1.out") )
  => (list-ec (:char-range c #\0 #\9) (string c #\newline)) )
 
 
diff --git a/tests/r4rstest.expected b/tests/r4rstest.expected
index 03be31d3..c446519a 100644
--- a/tests/r4rstest.expected
+++ b/tests/r4rstest.expected
@@ -544,26 +544,26 @@ SECTION(6 10 2)
 (#<procedure> #<input port "r4rstest.scm">)  ==> #\(
 (#<procedure> #<input port "r4rstest.scm">)  ==> (define errs (quote ()))
 SECTION(6 10 3)
-(#<procedure> "tmp1" #<procedure>)  ==> #t
-(#<procedure> #<input port "tmp1">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
+(#<procedure> "tmp1.out" #<procedure>)  ==> #t
+(#<procedure> #<input port "tmp1.out">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
 (#<procedure> #!eof)  ==> #t
 (#<procedure> #!eof)  ==> #t
 (input-port? #t)  ==> #t
-(#<procedure> #<input port "tmp1">)  ==> #\;
-(#<procedure> #<input port "tmp1">)  ==> #\;
-(#<procedure> #<input port "tmp1">)  ==> #\;
-(#<procedure> #<input port "tmp1">)  ==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
-(#<procedure> #<input port "tmp1">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
-(#<procedure> #<output port "tmp2">)  ==> #t
-(#<procedure> #<input port "tmp2">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
+(#<procedure> #<input port "tmp1.out">)  ==> #\;
+(#<procedure> #<input port "tmp1.out">)  ==> #\;
+(#<procedure> #<input port "tmp1.out">)  ==> #\;
+(#<procedure> #<input port "tmp1.out">)  ==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
+(#<procedure> #<input port "tmp1.out">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
+(#<procedure> #<output port "tmp2.out">)  ==> #t
+(#<procedure> #<input port "tmp2.out">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
 (#<procedure> #!eof)  ==> #t
 (#<procedure> #!eof)  ==> #t
 (input-port? #t)  ==> #t
-(#<procedure> #<input port "tmp2">)  ==> #\;
-(#<procedure> #<input port "tmp2">)  ==> #\;
-(#<procedure> #<input port "tmp2">)  ==> #\;
-(#<procedure> #<input port "tmp2">)  ==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
-(#<procedure> #<input port "tmp2">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
+(#<procedure> #<input port "tmp2.out">)  ==> #\;
+(#<procedure> #<input port "tmp2.out">)  ==> #\;
+(#<procedure> #<input port "tmp2.out">)  ==> #\;
+(#<procedure> #<input port "tmp2.out">)  ==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
+(#<procedure> #<input port "tmp2.out">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
 
 Passed all tests
 
@@ -590,16 +590,16 @@ SECTION(6 5 5)
 (#<procedure> 0 0)  ==> 1
 (#<procedure> 0 1)  ==> 0
 (#<procedure> 1 1)  ==> 0.785398163397448
-(#<procedure> "tmp3" #<procedure>)  ==> #t
-(#<procedure> #<input port "tmp3">)  ==> (define foo (quote (0.25 -3.25)))
+(#<procedure> "tmp3.out" #<procedure>)  ==> #t
+(#<procedure> #<input port "tmp3.out">)  ==> (define foo (quote (0.25 -3.25)))
 (#<procedure> #!eof)  ==> #t
 (#<procedure> #!eof)  ==> #t
 (input-port? #t)  ==> #t
-(#<procedure> #<input port "tmp3">)  ==> #\;
-(#<procedure> #<input port "tmp3">)  ==> #\;
-(#<procedure> #<input port "tmp3">)  ==> #\;
-(#<procedure> #<input port "tmp3">)  ==> (0.25 -3.25)
-(#<procedure> #<input port "tmp3">)  ==> (define foo (quote (0.25 -3.25)))
+(#<procedure> #<input port "tmp3.out">)  ==> #\;
+(#<procedure> #<input port "tmp3.out">)  ==> #\;
+(#<procedure> #<input port "tmp3.out">)  ==> #\;
+(#<procedure> #<input port "tmp3.out">)  ==> (0.25 -3.25)
+(#<procedure> #<input port "tmp3.out">)  ==> (define foo (quote (0.25 -3.25)))
 (pentium-fdiv-bug #t)  ==> #t
 
 Passed all tests
diff --git a/tests/r4rstest.scm b/tests/r4rstest.scm
index b098fe80..52f2e709 100644
--- a/tests/r4rstest.scm
+++ b/tests/r4rstest.scm
@@ -24,8 +24,8 @@
 ;;; and the IEEE specification.
 
 ;;; The input tests read this file expecting it to be named "r4rstest.scm".
-;;; Files `tmp1', `tmp2' and `tmp3' will be created in the course of running
-;;; these tests.  You may need to delete them in order to run
+;;; Files `tmp1'.out, `tmp2.out' and `tmp3.out' will be created in the course
+;;; of running these tests. You may need to delete them in order to run
 ;;; "r4rstest.scm" more than once.
 
 ;;;   There are three optional tests:
@@ -614,7 +614,7 @@
   (set! write-test-obj (list f.25 f-3.25));.25 inexact errors less likely.
   (set! load-test-obj (list 'define 'foo (list 'quote write-test-obj)))
   (test #t call-with-output-file
-      "tmp3"
+      "tmp3.out"
       (lambda (test-file)
 	(write-char #\; test-file)
 	(display #\; test-file)
@@ -623,7 +623,7 @@
 	(newline test-file)
 	(write load-test-obj test-file)
 	(output-port? test-file)))
-  (check-test-file "tmp3")
+  (check-test-file "tmp3.out")
   (set! write-test-obj wto)
   (set! load-test-obj lto)
   (let ((x (string->number "4195835.0"))
@@ -1173,7 +1173,7 @@
 (define load-test-obj
   (list 'define 'foo (list 'quote write-test-obj)))
 (test #t call-with-output-file
-      "tmp1"
+      "tmp1.out"
       (lambda (test-file)
 	(write-char #\; test-file)
 	(display #\; test-file)
@@ -1182,9 +1182,9 @@
 	(newline test-file)
 	(write load-test-obj test-file)
 	(output-port? test-file)))
-(check-test-file "tmp1")
+(check-test-file "tmp1.out")
 
-(define test-file (open-output-file "tmp2"))
+(define test-file (open-output-file "tmp2.out"))
 (write-char #\; test-file)
 (display #\; test-file)
 (display ";" test-file)
@@ -1193,7 +1193,7 @@
 (write load-test-obj test-file)
 (test #t output-port? test-file)
 (close-output-port test-file)
-(check-test-file "tmp2")
+(check-test-file "tmp2.out")
 (define (test-sc4)
   (newline)
   (display ";testing scheme 4 functions; ")
@@ -1209,7 +1209,7 @@
   (test '#(dididit dah) list->vector '(dididit dah))
   (test '#() list->vector '())
   (SECTION 6 10 4)
-  (load "tmp1")
+  (load "tmp1.out")
   (test write-test-obj 'load foo)
   (report-errs))
 
diff --git a/tests/runtests.sh b/tests/runtests.sh
index 74768407..dcfce65e 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -63,10 +63,10 @@ mkdir -p test-repository
 cp $TYPESDB test-repository/types.db
 
 echo "======================================== repository search path ..."
-export -p >./old-environment
+export -p >./env.out
 unset CHICKEN_REPOSITORY_PATH
 $interpret -s repository-path-default.scm
-. ./old-environment
+. ./env.out
 $compile_s sample-module.scm -j sample-module
 cp sample-module.so $CHICKEN_INSTALL_REPOSITORY
 cp sample-module.import.scm $CHICKEN_INSTALL_REPOSITORY
Trap