Commit 3ce167a6 authored by Nicolas Martyanoff's avatar Nicolas Martyanoff Committed by Nikodemus Siivola
Browse files

fix mapdir tests

Reading the files in a directory yields filenames in an undefined order. The
returned list needs to be sorted to make sure we always get the same order.
parent 072db702
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -212,7 +212,8 @@
           (subdir (ensure-directories-exist
                    (merge-pathnames "subdir/" dir))))
      (unwind-protect
           (remove-if #'null (mapdir #'pathname-name dir))
           (let ((result (remove-if #'null (mapdir #'pathname-name dir))))
             (sort result #'string<))
        (osicat-posix:unlink file1)
        (osicat-posix:unlink file2)
        (delete-directory subdir)
@@ -227,7 +228,8 @@
           (subdir (ensure-directories-exist
                    (merge-pathnames "subdir/" dir))))
      (unwind-protect
           (sort (mapdir #'namestring dir) #'string<)
           (let ((result (mapdir #'namestring dir)))
             (sort result #'string<))
        (osicat-posix:unlink file1)
        (osicat-posix:unlink file2)
        (delete-directory subdir)