Raymond Toy pushed to branch issue-193-nil-unspecific-equivalent at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • src/code/pathname.lisp
    ... ... @@ -505,11 +505,13 @@
    505 505
     		  (eq that :unspecific)))))))
    
    506 506
     
    
    507 507
     ;; Compare the version component.  We treat NIL to be EQUAL to
    
    508
    -;; :NEWEST.
    
    508
    +;; :NEWEST or :UNSPECIFIC.
    
    509 509
     (defun compare-version-component (this that)
    
    510 510
       (or (eql this that)
    
    511
    -      (and (null this) (eq that :newest))
    
    512
    -      (and (null that) (eq this :newest))))
    
    511
    +      (if (and (member this '(nil :newest :unspecific) :test #'eq)
    
    512
    +	       (member that '(nil :newest :unspecific) :test #'eq))
    
    513
    +	  t
    
    514
    +	  nil)))
    
    513 515
     
    
    514 516
     ;;;; Pathname functions.
    
    515 517
     
    

  • tests/issues.lisp
    ... ... @@ -962,3 +962,18 @@
    962 962
     		      (make-pathname :type nil)))
    
    963 963
       (assert-true (equal (make-pathname :type nil)
    
    964 964
     		      (make-pathname :type :unspecific))))
    
    965
    +
    
    966
    +(define-test issue.192.version
    
    967
    +  (assert-true (equal (make-pathname :version :newest)
    
    968
    +		      (make-pathname :version nil)))
    
    969
    +  (assert-true (equal (make-pathname :version nil)
    
    970
    +		      (make-pathname :version :newest)))
    
    971
    +  (assert-true (equal (make-pathname :version :unspecific)
    
    972
    +		      (make-pathname :version nil)))
    
    973
    +  (assert-true (equal (make-pathname :version nil)
    
    974
    +		      (make-pathname :version :unspecific)))
    
    975
    +  (assert-true (equal (make-pathname :version :unspecific)
    
    976
    +		      (make-pathname :version :newest)))
    
    977
    +  (assert-true (equal (make-pathname :version :newest)
    
    978
    +		      (make-pathname :version :unspecific)))
    
    979
    +)