From 2cde41a439bf19524cb485ef80bec4d1a9066314 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <fare@tunes.org> Date: Sat, 13 Feb 2010 14:11:01 -0500 Subject: [PATCH] Add trivial tests for version-satisfies, and fix some non-portability in run-tests.sh Thanks to tcr for suggestions. --- test/run-tests.sh | 11 ++++------- test/test-utilities.script | 6 ++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index 2c389dae..a170ec7b 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -171,21 +171,18 @@ if [ -z "${DEBUG_ASDF_TEST}" ] ; then command="$command $nodebug" fi -create_asds () { - mkdir -p {conf.d,dir1,dir2/{dir3,dir4}} - for i in dir1 dir2; do touch "$i"/test.asd; done - for i in dir3 dir4; do (cd dir2/$i; touch test.asd); done +create_config () { + mkdir -p ../tmp/test-source-registry-conf.d ../tmp/test-asdf-output-translations-conf.d } clean_up () { - rm -rf {conf.d,dir?} + rm -rf ../tmp/test-source-registry-conf.d ../tmp/test-asdf-output-translations-conf.d } - if [ -z "$command" ] ; then echo "Error: cannot find or do not know how to run Lisp named $lisp" else - create_asds + create_config mkdir -p results echo $command thedate=`date "+%Y-%m-%d"` diff --git a/test/test-utilities.script b/test/test-utilities.script index 19eacc18..a7216d5d 100644 --- a/test/test-utilities.script +++ b/test/test-utilities.script @@ -23,4 +23,10 @@ (make-pathname :name nil :type "bar" :directory '(:absolute "tmp")) (make-pathname :name "." :type nil :directory '(:absolute "tmp")) (make-pathname :name "." :type "" :directory '(:absolute "tmp"))))) +(assert + (asdf::version-satisfies (asdf:asdf-version) (asdf:asdf-version))) +(assert + (asdf::version-satisfies (asdf:asdf-version) "1.608")) +(assert + (not (asdf::version-satisfies (asdf:asdf-version) "666"))) ) -- GitLab