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

Tweak two tests in the hope of making them work on Windows.

parent 29592631
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
;;; -*- Lisp -*-



(in-package :asdf)
(use-package :asdf-test)
#+gcl2.6 (defmacro with-standard-io-syntax (&body body) `(progn ,@body))
@@ -52,6 +50,12 @@
          "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*
@@ -64,16 +68,19 @@
      (format s "(defsystem :foo~D)~%" i))))

(progn
 (assert-equal (asdf::parse-output-translations-string "/foo:/bar::/baz:/quux")
 (assert-equal (asdf::parse-output-translations-string
                (join-namestrings '("/foo" "/bar" "" "/baz" "/quux")))
               '(:output-translations ("/foo" "/bar") :inherit-configuration
                 ("/baz" "/quux")))
 (assert-equal (asdf::parse-output-translations-string "/:")
 (assert-equal (asdf::parse-output-translations-string
                (join-namestrings '("/" "")))
               '(:output-translations ("/" nil) :ignore-inherited-configuration))
 (assert-equal (asdf::parse-output-translations-string "/::")
 (assert-equal (asdf::parse-output-translations-string
                (join-namestrings '("/" "" "")))
               '(:output-translations ("/" nil) :inherit-configuration))
 (assert-equal (asdf::parse-output-translations-string "/:/")
 (assert-equal (asdf::parse-output-translations-string
                (join-namestrings '("/" "/")))
               '(:output-translations ("/" "/") :ignore-inherited-configuration))

 (assert-equal (asdf::parse-output-translations-string
                "(:output-translations (\"/\" \"/\") :ignore-inherited-configuration)")
               '(:output-translations ("/" "/") :ignore-inherited-configuration))
+3 −2
Original line number Diff line number Diff line
@@ -48,10 +48,11 @@
 (split-native-pathnames-string "foo:bar" :ensure-directory t)
 '(#p"foo/" #p"bar/"))
(assert-pathnames-equal
 (split-native-pathnames-string "/foo:/bar" :want-absolute t)
 (split-native-pathnames-string (strcat "/foo" (inter-directory-separator) "/bar") :want-absolute t)
 '(#p"/foo" #p"/bar"))
(assert-pathnames-equal
 (split-native-pathnames-string "/foo:/bar" :want-absolute t :ensure-directory t)
 (split-native-pathnames-string (strcat "/foo" (inter-directory-separator) "/bar")
                                :want-absolute t :ensure-directory t)
 '(#p"/foo/" #p"/bar/"))
(assert-equal
 (mapcar 'location-function-p