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

restructure: fix further tests


Signed-off-by: Daniel Kochmański's avatarDaniel Kochmański <daniel@turtleware.eu>
parent f70ee491
...@@ -15,28 +15,28 @@ ...@@ -15,28 +15,28 @@
nil) nil)
(deftest file-author.2 (deftest file-author.2
(let ((author (file-author "sample-files/file-author.txt"))) (let ((author (file-author "file-author.txt")))
(if (or (null author) (stringp author)) (if (or (null author) (stringp author))
nil nil
author)) author))
nil) nil)
(deftest file-author.3 (deftest file-author.3
(let ((author (file-author #p"sample-files/file-author.txt"))) (let ((author (file-author #p"file-author.txt")))
(if (or (null author) (stringp author)) (if (or (null author) (stringp author))
nil nil
author)) author))
nil) nil)
(deftest file-author.4 (deftest file-author.4
(let ((author (file-author (truename "sample-files/file-author.txt")))) (let ((author (file-author (truename "file-author.txt"))))
(if (or (null author) (stringp author)) (if (or (null author) (stringp author))
nil nil
author)) author))
nil) nil)
(deftest file-author.5 (deftest file-author.5
(let ((author (with-open-file (s "sample-files/file-author.txt" :direction :input) (let ((author (with-open-file (s "file-author.txt" :direction :input)
(file-author s)))) (file-author s))))
(if (or (null author) (stringp author)) (if (or (null author) (stringp author))
nil nil
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
nil) nil)
(deftest file-author.6 (deftest file-author.6
(let ((author (let ((s (open "sample-files/file-author.txt" :direction :input))) (let ((author (let ((s (open "file-author.txt" :direction :input)))
(close s) (close s)
(file-author s)))) (file-author s))))
(if (or (null author) (stringp author)) (if (or (null author) (stringp author))
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
(deftest file-author.7 (deftest file-author.7
(do-special-strings (do-special-strings
(s "sample-files/file-author.txt" nil) (s "file-author.txt" nil)
(assert (equal (file-author s) (file-author "sample-files/file-author.txt")))) (assert (equal (file-author s) (file-author "file-author.txt"))))
nil) nil)
;;; FIXME ;;; FIXME
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
t) t)
(deftest file-author.error.2 (deftest file-author.error.2
(signals-error (file-author "sample-files/file-author.txt" nil) program-error) (signals-error (file-author "file-author.txt" nil) program-error)
t) t)
(deftest file-author.error.3 (deftest file-author.error.3
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
(deftest file-author.error.4 (deftest file-author.error.4
(signals-error-always (signals-error-always
(file-author (make-pathname :name "sample-files/file-author" :type :wild (file-author (make-pathname :name "file-author" :type :wild
:defaults *default-pathname-defaults*)) :defaults *default-pathname-defaults*))
file-error) file-error)
t t) t t)
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
(deftest truename.1 (deftest truename.1
(let* ((pn #p"sample-files/truename.txt") (let* ((pn #p"truename.txt")
(tn (truename pn))) (tn (truename pn)))
(values (values
(notnot (pathnamep pn)) (notnot (pathnamep pn))
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
t nil t t) t nil t t)
(deftest truename.2 (deftest truename.2
(let* ((name "sample-files/truename.txt") (let* ((name "truename.txt")
(pn (pathname name)) (pn (pathname name))
(tn (truename name))) (tn (truename name)))
(values (values
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
t nil t t) t nil t t)
(deftest truename.3 (deftest truename.3
(let* ((pn #p"sample-files/truename.txt")) (let* ((pn #p"truename.txt"))
(with-open-file (with-open-file
(s pn :direction :input) (s pn :direction :input)
(let ((tn (truename s))) (let ((tn (truename s)))
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
t nil t t) t nil t t)
(deftest truename.4 (deftest truename.4
(let* ((pn #p"sample-files/truename.txt")) (let* ((pn #p"truename.txt"))
(let ((s (open pn :direction :input))) (let ((s (open pn :direction :input)))
(close s) (close s)
(let ((tn (truename s))) (let ((tn (truename s)))
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
(deftest truename.6 (deftest truename.6
(do-special-strings (do-special-strings
(s "sample-files/truename.txt" nil) (s "truename.txt" nil)
(assert (equalp (truename s) (truename "sample-files/truename.txt")))) (assert (equalp (truename s) (truename "truename.txt"))))
nil) nil)
;;; Error tests ;;; Error tests
...@@ -84,21 +84,21 @@ ...@@ -84,21 +84,21 @@
t) t)
(deftest truename.error.2 (deftest truename.error.2
(signals-error (truename "sample-files/truename.txt" nil) program-error) (signals-error (truename "truename.txt" nil) program-error)
t) t)
(deftest truename.error.3 (deftest truename.error.3
(signals-error-always (truename "sample-files/nonexistent") file-error) (signals-error-always (truename "nonexistent") file-error)
t t) t t)
(deftest truename.error.4 (deftest truename.error.4
(signals-error-always (truename #p"sample-files/nonexistent") file-error) (signals-error-always (truename #p"nonexistent") file-error)
t t) t t)
(deftest truename.error.5 (deftest truename.error.5
(signals-error-always (signals-error-always
(truename (truename
(logical-pathname "CLTESTROOT:sample-files/nonexistent")) (logical-pathname "CLTESTROOT:nonexistent"))
file-error) t t) file-error) t t)
(deftest truename.error.6 (deftest truename.error.6
......
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