[Git][cmucl/cmucl][master] 2 commits: Add a test for MR !15

Raymond Toy rtoy at common-lisp.net
Mon Oct 3 02:52:36 UTC 2016


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/4bf2062f18694d662f79d25c04989f61eab87460...593288777b39b1bfbe5aa5d5065993863de5e2eb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20161003/f633daa7/attachment-0001.html>


More information about the cmucl-cvs mailing list