From 4d77d02bd05fd5814206c86b218e170024ee2e33 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <fare@tunes.org> Date: Mon, 17 Oct 2011 17:23:22 -0400 Subject: [PATCH] Cleanup some tests --- test/file1.lisp | 1 - test/script-support.lisp | 7 +++++++ test/test-multiple.script | 4 ++-- test/test.lisp | 4 ++++ test/test3.script | 4 ++-- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/test/file1.lisp b/test/file1.lisp index 3612a2bac..e6b63ac79 100644 --- a/test/file1.lisp +++ b/test/file1.lisp @@ -1,4 +1,3 @@ (defpackage :test-package (:use :cl)) (in-package :test-package) (defvar *file1* t) - diff --git a/test/script-support.lisp b/test/script-support.lisp index 433611f5a..a007b3a8c 100644 --- a/test/script-support.lisp +++ b/test/script-support.lisp @@ -44,6 +44,13 @@ #+allegro (setf excl:*warn-on-nested-reader-conditionals* nil) +(defun native-namestring (x) + (let* ((p (pathname x))) + #+clozure (ccl:native-translated-namestring p) + #+(or cmu scl) (ext:unix-namestring p) + #+sbcl (sb-ext:native-namestring p) + #-(or clozure cmu sbcl scl) (namestring p))) + ;;; code adapted from cl-launch http://www.cliki.net/cl-launch (defun leave-lisp (message return) (fresh-line *error-output*) diff --git a/test/test-multiple.script b/test/test-multiple.script index e5d4cd184..2cd85838e 100644 --- a/test/test-multiple.script +++ b/test/test-multiple.script @@ -13,8 +13,8 @@ (setf asdf:*central-registry* `(*default-pathname-defaults* ,tmp)) (assert (= 0 (asdf:run-shell-command (format nil "/bin/ln -sf ~A ~A" - (#-scl namestring #+scl ext:unix-namestring asd) - (#-scl namestring #+scl ext:unix-namestring asd2 #+scl nil))))) + (native-namestring asd) + (native-namestring asd2))))) (asdf:oos 'asdf:load-source-op 'test-multiple-too) (assert (symbol-value (find-symbol (string :*file3*) :test-package))) (asdf:load-system 'test-multiple-free) diff --git a/test/test.lisp b/test/test.lisp index b72db4bc5..54d513487 100644 --- a/test/test.lisp +++ b/test/test.lisp @@ -1,4 +1,8 @@ ;;;; Example lisp code. +(in-package :cl-user) (defun tst (x) (1+ x)) + +(defun add10 (x) + (+ x 10)) diff --git a/test/test3.script b/test/test3.script index a8bdcee15..f3e42abae 100644 --- a/test/test3.script +++ b/test/test3.script @@ -6,8 +6,8 @@ (cl-user::quit-on-error (let* ((fasl1 (asdf:compile-file-pathname* (truename "file1.lisp"))) (fasl2 (asdf:compile-file-pathname* (truename "file2.lisp"))) - (ns1 (#-scl namestring #+scl ext:unix-namestring fasl1)) - (ns2 (#-scl namestring #+scl ext:unix-namestring fasl2))) + (ns1 (native-namestring fasl1)) + (ns2 (native-namestring fasl2))) (asdf:run-shell-command "rm -f ~A ~A" ns1 ns2) (setf asdf:*central-registry* '(*default-pathname-defaults*)) #-gcl -- GitLab