Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
asdf
asdf
Commits
9278f28a
Commit
9278f28a
authored
Jun 08, 2015
by
Francois-Rene Rideau
Browse files
Tests: better support case-independent filesystems in assert-pathname-equal.
parent
0b0561a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
test/script-support.lisp
View file @
9278f28a
...
...
@@ -167,8 +167,15 @@ Some constraints:
the other expression ~S yields that:~% ~S~% ~S~%"
qx
x
(
pathname-components
x
)
qy
y
(
pathname-components
y
)))
;; accept equalp namestrings, to account for case-independent filesystems
((
equalp
(
namestring
x
)
(
namestring
y
))
(
warn
"These two expressions yield pathnames that have equalp namestrings yet are not pathname-equal~%~
the first expression ~S yields this:~% ~S~% ~S~%
the other expression ~S yields that:~% ~S~% ~S~%"
qx
x
(
pathname-components
x
)
qy
y
(
pathname-components
y
)))
(
t
(
error
"These two expressions yield paths that are
not pathname-equal
~%~
(
error
"These two expressions yield paths that are
equal in any way:
~%~
the first expression ~S yields this:~% ~S~% ~S~%
the other expression ~S yields that:~% ~S~% ~S~%"
qx
x
(
pathname-components
x
)
...
...
test/test-utilities.script
View file @
9278f28a
...
...
@@ -8,13 +8,13 @@
:ensure-directory t))
(chdir *asdf-directory*)
(assert
(
pathname-equal *asdf-directory* (getcwd)))
(assert
(
pathname-equal *asdf-directory* (getcwd-from-run-program)))
(assert
-
pathname-equal *asdf-directory* (getcwd)))
(assert
-
pathname-equal *asdf-directory* (getcwd-from-run-program)))
(assert (probe-file* "asdf.asd"))
(chdir *test-directory*)
(assert
(
pathname-equal *test-directory* (getcwd))
)
(assert
(
pathname-equal *test-directory* (getcwd-from-run-program))
)
(assert
-
pathname-equal *test-directory* (getcwd))
(assert
-
pathname-equal *test-directory* (getcwd-from-run-program))
(assert (probe-file* "test-utilities.script"))
(assert
...
...
@@ -280,10 +280,6 @@
(assert (not (base-string-p (strcat (basify "ab") #\c *last-char* (unbasify "d")))))
(assert (base-string-p (strcat (basify "ab") #\c #\d))))
(or #+os-windows ;; Avoid C:\Users vs C:\users on SBCL.
(equalp (namestring *test-directory*) (namestring (getcwd)))
(assert-pathname-equal *test-directory* (getcwd)))
(assert-equal +crlf+ (map 'string 'code-char '(13 10)))
(assert-equal +lf+ (map 'string 'code-char '(10)))
(assert-equal +cr+ (map 'string 'code-char '(13)))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment