Commit 19afd715 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Improve tests on Windows, again.

parent c69a7d2a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ Some constraints:
   #:leave-test #:def-test-system
   #:action-name #:in-plan-p
   #:test-source #:test-fasl #:resolve-output #:output-location
   #:quietly))
   #:quietly #:join-namestrings))

(in-package :asdf-test)

@@ -601,6 +601,12 @@ is bound, write a message and exit on an error. If
    (assert (asymval '#:*file1* :test-package))
    (assert (asymval '#:*file3* :test-package))))

(defun join-namestrings (namestrings)
  (with-output-to-string (s)
    (loop :with separator = (acall :inter-directory-separator)
          :for (n . morep) :on namestrings
          :do (format s "~A~@[~C~]" n (and morep separator)))))

;; These are shorthands for interactive debugging of test scripts:
(!a
 common-lisp-user::debug-asdf debug-asdf
+45 −52
Original line number Diff line number Diff line
@@ -50,12 +50,6 @@
          "dir9/dirb/")                 ; foo9 should /not/ be found -- not under :here :tree
    :collect (under-tmp-directory dir)))

(defparameter *separator* (inter-directory-separator))
(defun join-namestrings (namestrings)
  (with-output-to-string (s)
    (loop :for (n . morep) :on namestrings
          :do (format s "~A~@[~C~]" n (and morep *separator*)))))

(defun create-asd-files ()
  (loop
    :for d :in *tmp-asd-directories*
@@ -67,7 +61,6 @@
                       :if-does-not-exist :create)
      (format s "(defsystem :foo~D)~%" i))))

(progn
(assert-equal (asdf::parse-output-translations-string
               (join-namestrings '("/foo" "/bar" "" "/baz" "/quux")))
              '(:output-translations ("/foo" "/bar") :inherit-configuration
@@ -118,4 +111,4 @@
        (namestring (system-relative-pathname :foo3 "bar/baz.lisp"))
        (under-tmp-directory "dir2/bar/baz.lisp"))
(assert-equal (namestring (system-relative-pathname :foo3 "bar/baz.lisp"))
               (under-tmp-directory "dir2/bar/baz.lisp")))
              (under-tmp-directory "dir2/bar/baz.lisp"))
+4 −4
Original line number Diff line number Diff line
@@ -42,16 +42,16 @@
(assert
 (not (version-satisfies (asdf-version) "666")))
(assert-pathnames-equal
 (split-native-pathnames-string "foo:bar")
 (split-native-pathnames-string (join-namestrings '("foo" "bar")))
 '(#p"foo" #p"bar"))
(assert-pathnames-equal
 (split-native-pathnames-string "foo:bar" :ensure-directory t)
 (split-native-pathnames-string (join-namestrings '("foo" "bar")) :ensure-directory t)
 '(#p"foo/" #p"bar/"))
(assert-pathnames-equal
 (split-native-pathnames-string (strcat "/foo" (inter-directory-separator) "/bar") :want-absolute t)
 (split-native-pathnames-string (join-namestrings '("/foo" "/bar")) :want-absolute t)
 '(#p"/foo" #p"/bar"))
(assert-pathnames-equal
 (split-native-pathnames-string (strcat "/foo" (inter-directory-separator) "/bar")
 (split-native-pathnames-string (join-namestrings '("/foo" "/bar"))
                                :want-absolute t :ensure-directory t)
 '(#p"/foo/" #p"/bar/"))
(assert-equal