Skip to content
Snippets Groups Projects
Commit e6f016aa authored by Daniel Kochmański's avatar Daniel Kochmański
Browse files

makefile: run tests in sandbox/ directory

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