Raymond Toy pushed to branch issue-157-directory-returns-all-files at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • tests/pathname.lisp
    ... ... @@ -19,28 +19,33 @@
    19 19
         (:tag :search-list)
    
    20 20
       ;; Basic tests where the wild path is search-list
    
    21 21
     
    
    22
    -  (assert-true (pathname-match-p "/tmp/foo.lisp" "foo:*"))
    
    23
    -  (assert-true (pathname-match-p "/tmp/zot/foo.lisp" "foo:**/*"))
    
    22
    +  (assert-false (pathname-match-p "/tmp/foo.lisp" "foo:*"))
    
    23
    +  (assert-true (pathname-match-p "/tmp/foo.lisp" "foo:*.*"))
    
    24
    +  (assert-false (pathname-match-p "/tmp/zot/foo.lisp" "foo:**/*"))
    
    25
    +  (assert-true (pathname-match-p "/tmp/zot/foo.lisp" "foo:**/*.*"))
    
    24 26
       (assert-true (pathname-match-p "/tmp/zot/foo.lisp" "foo:**/*.lisp"))
    
    25 27
       ;; These match because the second entry of the "foo:" search list is
    
    26 28
       ;; "/usr/".
    
    27
    -  (assert-true (pathname-match-p "/usr/foo.lisp" "foo:*"))
    
    29
    +  (assert-false (pathname-match-p "/usr/foo.lisp" "foo:*"))
    
    30
    +  (assert-true (pathname-match-p "/usr/foo.lisp" "foo:*.*"))
    
    28 31
       (assert-true (pathname-match-p "/usr/bin/foo" "foo:**/*"))
    
    29 32
       (assert-true (pathname-match-p "/usr/bin/foo.lisp" "foo:**/*.lisp"))
    
    30 33
     
    
    31 34
       ;; This fails because "/bin/" doesn't match any path of the search
    
    32 35
       ;; list.
    
    33
    -  (assert-false (pathname-match-p "/bin/foo.lisp" "foo:*"))
    
    36
    +  (assert-false (pathname-match-p "/bin/foo.lisp" "foo:*.*"))
    
    34 37
     
    
    35 38
       ;; Basic test where the pathname is a search-list and the wild path is not.
    
    36
    -  (assert-true (pathname-match-p "foo:foo.lisp" "/tmp/*"))
    
    39
    +  (assert-false (pathname-match-p "foo:foo.lisp" "/tmp/*"))
    
    40
    +  (assert-true (pathname-match-p "foo:foo.lisp" "/tmp/*.*"))
    
    37 41
       (assert-true (pathname-match-p "foo:foo" "/usr/*"))
    
    42
    +  (assert-true (pathname-match-p "foo:foo" "/usr/*.*"))
    
    38 43
       (assert-true (pathname-match-p "foo:zot/foo.lisp" "/usr/**/*.lisp"))
    
    39 44
     
    
    40 45
       (assert-false (pathname-match-p "foo:foo" "/bin/*"))
    
    41 46
       
    
    42 47
       ;; Tests where both args are search-lists.
    
    43
    -  (assert-true "foo:foo.lisp" "bar:*"))
    
    48
    +  (assert-true (pathname-match-p "foo:foo.lisp" "bar:*.*")))
    
    44 49
     
    
    45 50
     ;; Verify PATHNAME-MATCH-P works with logical pathnames.  (Issue 27)
    
    46 51
     ;; This test modeled after a test from asdf