Changeset 13294


Ignore:
Timestamp:
05/24/11 12:25:55 (10 years ago)
Author:
Mark Evenson
Message:

Fix #150: MAKE-PATHNAME ignores version in :DEFAULTS.

Location:
trunk/abcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Pathname.java

    r13291 r13294  
    12551255        boolean typeSupplied = false;
    12561256        boolean directorySupplied = false;
     1257        boolean versionSupplied = false;
    12571258        for (int i = 0; i < args.length; i += 2) {
    12581259            LispObject key = args[i];
     
    12911292            } else if (key == Keyword.VERSION) {
    12921293                version = value;
     1294                versionSupplied = true;
    12931295            } else if (key == Keyword.DEFAULTS) {
    12941296                defaults = coerceToPathname(value);
     
    13121314            if (!typeSupplied) {
    13131315                type = defaults.type;
     1316            }
     1317            if (!versionSupplied) {
     1318                version = defaults.version;
    13141319            }
    13151320        }
     
    13861391            }
    13871392        }
     1393       
    13881394        p.version = version;
    13891395        return p;
  • trunk/abcl/test/lisp/abcl/pathname-tests.lisp

    r13263 r13294  
    17181718    (make-pathname :directory nil :defaults "/home/fare/")
    17191719  #p"")
     1720
     1721(deftest pathname.make-pathname.2
     1722    (let ((p (make-pathname
     1723              :defaults (make-pathname :name :wild :type :wild :version :wild :directory :wild))))
     1724      (values
     1725       (pathname-name p) (pathname-type p) (pathname-version p) (pathname-directory p)))
     1726  :wild :wild :wild (:absolute :wild))
     1727     
Note: See TracChangeset for help on using the changeset viewer.