X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fpathnames.impure.lisp;h=a58c08eb0fd99e7b92dee070c100f96c8c63b04c;hb=fe36a56422d474a00a58812ec886eb14f024ba0d;hp=3d5c721f7974060b741a6cb7d59145c49dd2dc88;hpb=ffd0723ac8c26916d35d806e1eaad60557fb4a96;p=sbcl.git diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index 3d5c721..a58c08e 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -314,5 +314,22 @@ (assert (equal (read-from-string (format nil "~S" p)) p))) (print-not-readable () nil)))) +;;; BUG 330: "PARSE-NAMESTRING should accept namestrings as the default argument" +;;; ...and streams as well +(assert (equal (parse-namestring "foo" nil "/") + (parse-namestring "foo" nil #P"/"))) +(let ((test "parse-namestring-test.tmp")) + (unwind-protect + (with-open-file (f test :direction :output) + ;; FIXME: This test is a bit flaky, since we only check that + ;; no error is signalled. The dilemma here is "what is the + ;; correct result when defaults is a _file_, not a + ;; directory". Currently (0.8.10.73) we get #P"foo" here (as + ;; opposed to eg. #P"/path/to/current/foo"), which is + ;; possibly mildly surprising but probably conformant. + (assert (parse-namestring "foo" nil f))) + (when (probe-file test) + (delete-file test)))) + ;;;; success (quit :unix-status 104)