>From 2bcc83d2c640a4ce778c450b9a0d88c087edeec3 Mon Sep 17 00:00:00 2001 From: Oleg Kolosov Date: Wed, 22 Jul 2015 23:51:18 +0300 Subject: [PATCH] Use distinct import library names for tests Signed-off-by: Evan Hanson --- tests/import-library-test1.scm | 2 +- tests/import-library-test2.scm | 2 +- tests/meta-syntax-test.scm | 6 +++--- tests/runtests.bat | 18 ++++++++++-------- tests/runtests.sh | 18 ++++++++++-------- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/tests/import-library-test1.scm b/tests/import-library-test1.scm index f0c5138..78a81e8 100644 --- a/tests/import-library-test1.scm +++ b/tests/import-library-test1.scm @@ -1,4 +1,4 @@ -(module foo (foo xcase) +(module import-library-test1 (foo xcase) (import (rename scheme (case xcase))) (define-syntax foo (syntax-rules () diff --git a/tests/import-library-test2.scm b/tests/import-library-test2.scm index e0c3b2b..20756e3 100644 --- a/tests/import-library-test2.scm +++ b/tests/import-library-test2.scm @@ -1,7 +1,7 @@ (require-library import-library-test1) (module bar (xcase) - (import scheme chicken extras foo) + (import scheme chicken extras import-library-test1) (assert (equal? '(123) (foo))) (assert (= 2 (xcase 1 ((1) 2))))) diff --git a/tests/meta-syntax-test.scm b/tests/meta-syntax-test.scm index 2f4b1c9..6be1a6f 100755 --- a/tests/meta-syntax-test.scm +++ b/tests/meta-syntax-test.scm @@ -1,7 +1,7 @@ ;;;; meta-syntax-test.scm -(module foo (bar listify) +(module meta-syntax-test (bar listify) (import scheme chicken) (begin-for-syntax (define (baz x) @@ -20,9 +20,9 @@ (lambda (e r c) (call-it-123 list))))) -(module foo-usage (foo-user) +(module meta-syntax-test-usage (foo-user) (import chicken scheme) - (begin-for-syntax (import (prefix foo foo:))) + (begin-for-syntax (import (prefix meta-syntax-test foo:))) (define-syntax testing (er-macro-transformer (lambda (x r c) diff --git a/tests/runtests.bat b/tests/runtests.bat index b6ef378..e06e923 100644 --- a/tests/runtests.bat +++ b/tests/runtests.bat @@ -185,14 +185,16 @@ a.out if errorlevel 1 exit /b 1 echo ======================================== meta-syntax tests ... -%interpret% -bnq meta-syntax-test.scm -e "(import foo)" -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" +del /f /q meta-syntax-test.import.* +%interpret% -bnq meta-syntax-test.scm -e "(import meta-syntax-test)" -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" if errorlevel 1 exit /b 1 -%compile_s% meta-syntax-test.scm -j foo +%compile_s% meta-syntax-test.scm -j meta-syntax-test if errorlevel 1 exit /b 1 -%compile_s% foo.import.scm +%compile_s% meta-syntax-test.import.scm if errorlevel 1 exit /b 1 -%interpret% -bnq -e "(require-library meta-syntax-test)" -e "(import foo)" -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" +%interpret% -bnq -e "(require-library meta-syntax-test)" -e "(import meta-syntax-test)" -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" if errorlevel 1 exit /b 1 +del /f /q meta-syntax-test.import.* echo ======================================== reexport tests ... %interpret% -bnq reexport-tests.scm @@ -266,12 +268,12 @@ echo ======================================== import tests ... if errorlevel 1 exit /b 1 echo ======================================== import library tests ... -del /f /q ..\foo.import.* foo.import.* -%compile% import-library-test1.scm -emit-import-library foo +del /f /q import-library-test1.import.* +%compile% import-library-test1.scm -emit-import-library import-library-test1 if errorlevel 1 exit /b 1 %interpret% -s import-library-test2.scm if errorlevel 1 exit /b 1 -%compile_s% foo.import.scm -o foo.import.so +%compile_s% import-library-test1.import.scm -o import-library-test1.import.so if errorlevel 1 exit /b 1 %interpret% -s import-library-test2.scm if errorlevel 1 exit /b 1 @@ -279,7 +281,7 @@ if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1 a.out if errorlevel 1 exit /b 1 -del /f /q foo.import.* +del /f /q import-library-test1.import.* echo ======================================== optionals test ... %interpret% -s test-optional.scm diff --git a/tests/runtests.sh b/tests/runtests.sh index 7e078ff..6307249 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -189,10 +189,12 @@ $compile syntax-tests-2.scm ./a.out echo "======================================== meta-syntax tests ..." -$interpret -bnq meta-syntax-test.scm -e '(import foo)' -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" -e "(import foo-usage)" -e "(assert (equal? '(1) (foo-user)))" -$compile_s meta-syntax-test.scm -j foo -$compile_s foo.import.scm -$interpret -bnq -e '(require-library meta-syntax-test)' -e '(import foo)' -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" -e "(import foo-usage)" -e "(assert (equal? '(1) (foo-user)))" +rm -f ./meta-syntax-test.import.* +$interpret -bnq meta-syntax-test.scm -e '(import meta-syntax-test)' -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" -e "(import meta-syntax-test-usage)" -e "(assert (equal? '(1) (foo-user)))" +$compile_s meta-syntax-test.scm -j meta-syntax-test +$compile_s meta-syntax-test.import.scm +$interpret -bnq -e '(require-library meta-syntax-test)' -e '(import meta-syntax-test)' -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" -e "(import meta-syntax-test-usage)" -e "(assert (equal? '(1) (foo-user)))" +rm -f ./meta-syntax-test.import.* echo "======================================== reexport tests ..." $interpret -bnq reexport-tests.scm @@ -235,14 +237,14 @@ echo "======================================== import tests ..." $interpret -bnq import-tests.scm echo "======================================== import library tests ..." -rm -f ../foo.import.* foo.import.* -$compile import-library-test1.scm -emit-import-library foo +rm -f ./import-library-test1.import.* +$compile import-library-test1.scm -emit-import-library import-library-test1 $interpret -s import-library-test2.scm -$compile_s foo.import.scm -o foo.import.so +$compile_s import-library-test1.import.scm -o import-library-test1.import.so $interpret -s import-library-test2.scm $compile import-library-test2.scm ./a.out -rm -f foo.import.* +rm -f ./import-library-test1.import.* echo "======================================== optionals test ..." $interpret -s test-optional.scm -- 2.1.4