Commit e6f016aa authored by Daniel Kochmański's avatar Daniel Kochmański
Browse files

makefile: run tests in sandbox/ directory


Signed-off-by: Daniel Kochmański's avatarDaniel Kochmański <daniel@turtleware.eu>
parent e93ee420
...@@ -70,7 +70,8 @@ ...@@ -70,7 +70,8 @@
(when *load-pathname* (when *load-pathname*
(mapc #'regression-test:rem-test '(load-pathname.1 load-truename.1))) (mapc #'regression-test:rem-test '(load-pathname.1 load-truename.1)))
(time (regression-test:do-tests)) (ext:chdir #P"sandbox/")
(time (regression-test:do-tests)))
#+allegro (cl-user::exit) #+allegro (cl-user::exit)
#+(or cmu sbcl gcl armedbear clisp) (cl-user::quit) #+(or cmu sbcl gcl armedbear clisp) (cl-user::quit)
...@@ -6,23 +6,23 @@ ...@@ -6,23 +6,23 @@
(deftest directory.1 (deftest directory.1
(directory "sample-files/nonexistent") (directory "nonexistent")
nil) nil)
(deftest directory.2 (deftest directory.2
(directory #p"sample-files/nonexistent") (directory #p"nonexistent")
nil) nil)
(deftest directory.3 (deftest directory.3
(directory "sample-files/nonexistent" :allow-other-keys nil) (directory "nonexistent" :allow-other-keys nil)
nil) nil)
(deftest directory.4 (deftest directory.4
(directory "sample-files/nonexistent" :allow-other-keys t :foo 'bar) (directory "nonexistent" :allow-other-keys t :foo 'bar)
nil) nil)
(deftest directory.5 (deftest directory.5
(directory "sample-files/nonexistent" :foo 0 :allow-other-keys t) (directory "nonexistent" :foo 0 :allow-other-keys t)
nil) nil)
(deftest directory.6 (deftest directory.6
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
(deftest directory.9 (deftest directory.9
(do-special-strings (do-special-strings
(s "sample-files/nonexistent" nil) (s "nonexistent" nil)
(assert (null (directory s)))) (assert (null (directory s))))
nil) nil)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
(deftest file-write-date.1 (deftest file-write-date.1
(let* ((pn "sample-files/file-write-date.txt") (let* ((pn "file-write-date.txt")
(date (file-write-date pn)) (date (file-write-date pn))
(time (get-universal-time))) (time (get-universal-time)))
(or (null date) (or (null date)
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
t) t)
(deftest file-write-date.2 (deftest file-write-date.2
(let* ((pn #p"sample-files/file-write-date.txt") (let* ((pn #p"file-write-date.txt")
(date (file-write-date pn)) (date (file-write-date pn))
(time (get-universal-time))) (time (get-universal-time)))
(or (null date) (or (null date)
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
t) t)
(deftest file-write-date.3 (deftest file-write-date.3
(let* ((pn (truename "sample-files/file-write-date.txt")) (let* ((pn (truename "file-write-date.txt"))
(date (file-write-date pn)) (date (file-write-date pn))
(time (get-universal-time))) (time (get-universal-time)))
(or (null date) (or (null date)
...@@ -47,13 +47,13 @@ ...@@ -47,13 +47,13 @@
nil) nil)
(deftest file-write-date.5 (deftest file-write-date.5
(length (multiple-value-list (file-write-date "sample-files/file-write-date.txt"))) (length (multiple-value-list (file-write-date "file-write-date.txt")))
1) 1)
;;; Specialized string tests ;;; Specialized string tests
(deftest file-write-date.6 (deftest file-write-date.6
(let* ((str "sample-files/file-write-date.txt") (let* ((str "file-write-date.txt")
(date (file-write-date str))) (date (file-write-date str)))
(do-special-strings (do-special-strings
(s str nil) (s str nil)
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
t) t)
(deftest file-write-date.error.2 (deftest file-write-date.error.2
(signals-error (file-write-date "sample-files/file-write-date.txt" nil) (signals-error (file-write-date "file-write-date.txt" nil)
program-error) program-error)
t) t)
......
...@@ -12,7 +12,7 @@ MAKE=make ...@@ -12,7 +12,7 @@ MAKE=make
test: test:
@rm -rf scratch @rm -rf scratch
cat doit.lsp | $(LISP) | tee test.out cd sandbox | cat doit.lsp | $(LISP) | tee test.out
test-symbols: test-symbols:
(cat doit1.lsp ; echo "(load \"load-symbols.lsp\")"; cat doit2.lsp) | $(LISP) | tee test-symbols.out (cat doit1.lsp ; echo "(load \"load-symbols.lsp\")"; cat doit2.lsp) | $(LISP) | tee test-symbols.out
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
(deftest directory-namestring.1 (deftest directory-namestring.1
(let* ((vals (multiple-value-list (let* ((vals (multiple-value-list
(directory-namestring "sample-files/directory-namestring.txt"))) (directory-namestring "directory-namestring.txt")))
(s (first vals))) (s (first vals)))
(if (and (null (cdr vals)) (if (and (null (cdr vals))
(stringp s) (stringp s)
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
(deftest directory-namestring.2 (deftest directory-namestring.2
(do-special-strings (do-special-strings
(s "sample-files/directory-namestring.txt" nil) (s "directory-namestring.txt" nil)
(let ((ns (directory-namestring s))) (let ((ns (directory-namestring s)))
(assert (stringp ns)) (assert (stringp ns))
(assert (string= (directory-namestring ns) ns)))) (assert (string= (directory-namestring ns) ns))))
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
;;; in which so much is left up to the implementation.) ;;; in which so much is left up to the implementation.)
#-lispworks #-lispworks
(deftest directory-namestring.3 (deftest directory-namestring.3
(let* ((name "sample-files/directory-namestring.txt") (let* ((name "directory-namestring.txt")
(pn (merge-pathnames (pathname name))) (pn (merge-pathnames (pathname name)))
(name2 (with-open-file (s pn :direction :input) (name2 (with-open-file (s pn :direction :input)
(directory-namestring s))) (directory-namestring s)))
...@@ -47,6 +47,6 @@ ...@@ -47,6 +47,6 @@
(deftest directory-namestring.error.2 (deftest directory-namestring.error.2
(signals-error (signals-error
(directory-namestring "sample-files/directory-namestring.txt" nil) (directory-namestring "directory-namestring.txt" nil)
program-error) program-error)
t) t)
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
(deftest enough-namestring.1 (deftest enough-namestring.1
(let* ((vals (multiple-value-list (let* ((vals (multiple-value-list
(enough-namestring "sample-files/enough-namestring.txt"))) (enough-namestring "enough-namestring.txt")))
(s (first vals))) (s (first vals)))
(if (and (null (cdr vals)) (if (and (null (cdr vals))
(stringp s) (stringp s)
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
(deftest enough-namestring.2 (deftest enough-namestring.2
(do-special-strings (do-special-strings
(s "sample-files/enough-namestring.txt" nil) (s "enough-namestring.txt" nil)
(let ((ns (enough-namestring s))) (let ((ns (enough-namestring s)))
(assert (stringp ns)) (assert (stringp ns))
(assert (string= (enough-namestring ns) ns)))) (assert (string= (enough-namestring ns) ns))))
nil) nil)
(deftest enough-namestring.3 (deftest enough-namestring.3
(let* ((name "sample-files/enough-namestring.txt") (let* ((name "enough-namestring.txt")
(pn (merge-pathnames (pathname name))) (pn (merge-pathnames (pathname name)))
(name2 (enough-namestring pn)) (name2 (enough-namestring pn))
(name3 (enough-namestring name))) (name3 (enough-namestring name)))
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
t) t)
(deftest enough-namestring.4 (deftest enough-namestring.4
(let* ((name "sample-files/enough-namestring.txt") (let* ((name "enough-namestring.txt")
(pn (merge-pathnames (pathname name))) (pn (merge-pathnames (pathname name)))
(name2 (with-open-file (s pn :direction :input) (enough-namestring s))) (name2 (with-open-file (s pn :direction :input) (enough-namestring s)))
(name3 (enough-namestring name))) (name3 (enough-namestring name)))
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
(deftest enough-namestring.5 (deftest enough-namestring.5
(let* ((vals (multiple-value-list (let* ((vals (multiple-value-list
(enough-namestring "sample-files/enough-namestring.txt" (enough-namestring "enough-namestring.txt"
*default-pathname-defaults*))) *default-pathname-defaults*)))
(s (first vals))) (s (first vals)))
(if (and (null (cdr vals)) (if (and (null (cdr vals))
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
(deftest enough-namestring.6 (deftest enough-namestring.6
(let* ((vals (multiple-value-list (let* ((vals (multiple-value-list
(enough-namestring "sample-files/enough-namestring.txt" (enough-namestring "enough-namestring.txt"
(namestring *default-pathname-defaults*)))) (namestring *default-pathname-defaults*))))
(s (first vals))) (s (first vals)))
(if (and (null (cdr vals)) (if (and (null (cdr vals))
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
(do-special-strings (do-special-strings
(s (namestring *default-pathname-defaults*) nil) (s (namestring *default-pathname-defaults*) nil)
(let* ((vals (multiple-value-list (let* ((vals (multiple-value-list
(enough-namestring "sample-files/enough-namestring.txt" s))) (enough-namestring "enough-namestring.txt" s)))
(s2 (first vals))) (s2 (first vals)))
(assert (null (cdr vals))) (assert (null (cdr vals)))
(assert (stringp s2)) (assert (stringp s2))
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
(deftest enough-namestring.error.2 (deftest enough-namestring.error.2
(signals-error (signals-error
(enough-namestring "sample-files/enough-namestring.txt" (enough-namestring "enough-namestring.txt"
*default-pathname-defaults* nil) *default-pathname-defaults* nil)
program-error) program-error)
t) t)
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
(deftest file-namestring.1 (deftest file-namestring.1
(let* ((vals (multiple-value-list (let* ((vals (multiple-value-list
(file-namestring "sample-files/file-namestring.txt"))) (file-namestring "file-namestring.txt")))
(s (first vals))) (s (first vals)))
(if (and (null (cdr vals)) (if (and (null (cdr vals))
(stringp s) (stringp s)
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
(deftest file-namestring.2 (deftest file-namestring.2
(do-special-strings (do-special-strings
(s "sample-files/file-namestring.txt" nil) (s "file-namestring.txt" nil)
(let ((ns (file-namestring s))) (let ((ns (file-namestring s)))
(assert (stringp ns)) (assert (stringp ns))
(assert (string= (file-namestring ns) ns)))) (assert (string= (file-namestring ns) ns))))
nil) nil)
(deftest file-namestring.3 (deftest file-namestring.3
(let* ((name "sample-files/file-namestring.txt") (let* ((name "file-namestring.txt")
(pn (merge-pathnames (pathname name))) (pn (merge-pathnames (pathname name)))
(name2 (with-open-file (s pn :direction :input) (name2 (with-open-file (s pn :direction :input)
(file-namestring s))) (file-namestring s)))
...@@ -38,6 +38,6 @@ ...@@ -38,6 +38,6 @@
t) t)
(deftest file-namestring.error.2 (deftest file-namestring.error.2
(signals-error (file-namestring "sample-files/file-namestring.txt" nil) (signals-error (file-namestring "file-namestring.txt" nil)
program-error) program-error)
t) t)
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
(deftest host-namestring.1 (deftest host-namestring.1
(let* ((vals (multiple-value-list (let* ((vals (multiple-value-list
(host-namestring "sample-files/host-namestring.txt"))) (host-namestring "host-namestring.txt")))
(s (first vals))) (s (first vals)))
(if (and (null (cdr vals)) (if (and (null (cdr vals))
(or (null s) (or (null s)
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
(deftest host-namestring.2 (deftest host-namestring.2
(do-special-strings (do-special-strings
(s "sample-files/host-namestring.txt" nil) (s "host-namestring.txt" nil)
(let ((ns (host-namestring s))) (let ((ns (host-namestring s)))
(when ns (when ns
(assert (stringp ns)) (assert (stringp ns))
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
nil) nil)
(deftest host-namestring.3 (deftest host-namestring.3
(let* ((name "sample-files/host-namestring.txt") (let* ((name "host-namestring.txt")
(pn (merge-pathnames (pathname name))) (pn (merge-pathnames (pathname name)))
(name2 (with-open-file (s pn :direction :input) (name2 (with-open-file (s pn :direction :input)
(host-namestring s))) (host-namestring s)))
...@@ -44,6 +44,6 @@ ...@@ -44,6 +44,6 @@
t) t)
(deftest host-namestring.error.2 (deftest host-namestring.error.2
(signals-error (host-namestring "sample-files/host-namestring.txt" nil) (signals-error (host-namestring "host-namestring.txt" nil)
program-error) program-error)
t) t)
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
(deftest logical-pathname.error.3 (deftest logical-pathname.error.3
(signals-error (signals-error
(with-open-file (s #p"sample-files/logical-pathname.txt" :direction :input) (with-open-file (s #p"logical-pathname.txt" :direction :input)
(logical-pathname s)) (logical-pathname s))
type-error) type-error)
t) t)
......
...@@ -10,21 +10,21 @@ ...@@ -10,21 +10,21 @@
t) t)
(deftest pathname.2 (deftest pathname.2
(equalt #p"sample-files/pathname.txt" (pathname "sample-files/pathname.txt")) (equalt #p"pathname.txt" (pathname "pathname.txt"))
t) t)
(deftest pathname.3 (deftest pathname.3
(let ((s (open "sample-files/pathname.txt" :direction :input))) (let ((s (open "pathname.txt" :direction :input)))
(prog1 (equalt (truename (pathname s)) (prog1 (equalt (truename (pathname s))
(truename #p"sample-files/pathname.txt")) (truename #p"pathname.txt"))
(close s))) (close s)))
t) t)
(deftest pathname.4 (deftest pathname.4
(let ((s (open "sample-files/pathname.txt" :direction :input))) (let ((s (open "pathname.txt" :direction :input)))
(close s) (close s)
(equalt (truename (pathname s)) (equalt (truename (pathname s))
(truename #p"sample-files/pathname.txt"))) (truename #p"pathname.txt")))
t) t)
(deftest pathname.5 (deftest pathname.5
...@@ -33,41 +33,41 @@ ...@@ -33,41 +33,41 @@
t) t)
(deftest pathname.6 (deftest pathname.6
(equalt #p"sample-files/pathname.txt" (equalt #p"pathname.txt"
(pathname (pathname
(make-array 25 (make-array 25
:initial-contents "sample-files/pathname.txt" :initial-contents "pathname.txt"
:element-type 'base-char))) :element-type 'base-char)))
t) t)
(deftest pathname.7 (deftest pathname.7
(equalt #p"sample-files/pathname.txt" (equalt #p"pathname.txt"
(pathname (make-array 28 (pathname (make-array 28
:initial-contents "sample-files/pathname.txtXXX" :initial-contents "pathname.txtXXX"
:element-type 'base-char :element-type 'base-char
:fill-pointer 25))) :fill-pointer 25)))
t) t)
(deftest pathname.8 (deftest pathname.8
(equalt #p"sample-files/pathname.txt" (equalt #p"pathname.txt"
(pathname (make-array 25 (pathname (make-array 25
:initial-contents "sample-files/pathname.txt" :initial-contents "pathname.txt"
:element-type 'base-char :element-type 'base-char
:adjustable t))) :adjustable t)))
t) t)
(deftest pathname.9 (deftest pathname.9
(equalt #p"sample-files/pathname.txt" (equalt #p"pathname.txt"
(pathname (make-array 28 (pathname (make-array 28
:initial-contents "sample-files/pathname.txtXXX" :initial-contents "pathname.txtXXX"
:element-type 'character :element-type 'character
:fill-pointer 25))) :fill-pointer 25)))
t) t)
(deftest pathname.10 (deftest pathname.10
(equalt #p"sample-files/pathname.txt" (equalt #p"pathname.txt"
(pathname (make-array 25 (pathname (make-array 25
:initial-contents "sample-files/pathname.txt" :initial-contents "pathname.txt"
:element-type 'character :element-type 'character
:adjustable t))) :adjustable t)))
t) t)
...@@ -75,11 +75,11 @@ ...@@ -75,11 +75,11 @@
(deftest pathname.11 (deftest pathname.11
(loop for etype in '(standard-char base-char character) (loop for etype in '(standard-char base-char character)
collect collect
(equalt #p"sample-files/pathname.txt" (equalt #p"pathname.txt"
(pathname (pathname
(let* ((s (make-array 28 (let* ((s (make-array 28
:initial-contents :initial-contents
"XXsample-files/pathname.txtX" "XXpathname.txtX"
:element-type etype))) :element-type etype)))
(make-array 25 (make-array 25
:element-type etype :element-type etype
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment