Raymond Toy pushed to branch master at cmucl / cmucl
Commits: 7b85c61b by Elias Pipping at 2016-10-03T01:05:41+00:00 Add a test for MR !15
- - - - - 59328877 by Raymond Toy at 2016-10-03T02:52:35+00:00 Merge branch 'test-for-mr.15' into 'master'
Add a test for MR !15
See merge request !16 - - - - -
6 changed files:
- tests/issues.lisp - + tests/resources/mr.15/dir/file-in-dir - + tests/resources/mr.15/file - + tests/resources/mr.15/link-to-dir - + tests/resources/mr.15/link-to-dir-in-dir - + tests/resources/mr.15/link-to-file
Changes:
===================================== tests/issues.lisp ===================================== --- a/tests/issues.lisp +++ b/tests/issues.lisp @@ -12,6 +12,12 @@ (declare (ignore arg)) form)
+(defparameter *test-path* + (merge-pathnames (make-pathname :name :unspecific :type :unspecific + :version :unspecific) + *load-truename*) + "Directory for temporary test files.") + (define-test issue.1.a (:tag :issues) (assert-equal @@ -321,3 +327,23 @@ (assert-error 'kernel:simple-program-error (ext:run-program "cat" nil :before-execve t))) + +(define-test mr.15 + (:tag :issues) + (let (directories files) + (dolist (entry (directory (merge-pathnames "resources/mr.15/*.*" *test-path*) + :check-for-subdirs t + :follow-links nil + :truenamep nil)) + (let ((filename (pathname-name entry)) + (directory (first (last (pathname-directory entry))))) + (if filename + (push filename files) + (push directory directories)))) + (assert (null (set-difference files + '("file" "link-to-dir" + "link-to-dir-in-dir" "link-to-file") + :test #'string-equal))) + (assert (null (set-difference directories + '(".dir" "dir") + :test #'string-equal)))))
===================================== tests/resources/mr.15/dir/file-in-dir ===================================== --- /dev/null +++ b/tests/resources/mr.15/dir/file-in-dir
===================================== tests/resources/mr.15/file ===================================== --- /dev/null +++ b/tests/resources/mr.15/file
===================================== tests/resources/mr.15/link-to-dir ===================================== --- /dev/null +++ b/tests/resources/mr.15/link-to-dir @@ -0,0 +1 @@ +dir \ No newline at end of file
===================================== tests/resources/mr.15/link-to-dir-in-dir ===================================== --- /dev/null +++ b/tests/resources/mr.15/link-to-dir-in-dir @@ -0,0 +1 @@ +dir/dir-in-dir \ No newline at end of file
===================================== tests/resources/mr.15/link-to-file ===================================== --- /dev/null +++ b/tests/resources/mr.15/link-to-file @@ -0,0 +1 @@ +file \ No newline at end of file
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/4bf2062f18694d662f79d25c0...