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

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

parent 29592631
;;; -*- 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))
......
......@@ -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
......
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