Ticket #150: abcl-make-pathname-version.diff

File abcl-make-pathname-version.diff, 2.4 KB (added by Mark Evenson, 14 years ago)

Patch to fix root cause of #150

  • src/org/armedbear/lisp/Pathname.java

    diff -r 8d33f6ebc961 src/org/armedbear/lisp/Pathname.java
    a b  
    12541254        boolean nameSupplied = false;
    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];
    12591260            LispObject value = args[i + 1];
     
    12901291                typeSupplied = true;
    12911292            } else if (key == Keyword.VERSION) {
    12921293                version = value;
     1294                versionSupplied = true;
    12931295            } else if (key == Keyword.DEFAULTS) {
    12941296                defaults = coerceToPathname(value);
    12951297            } else if (key == Keyword.CASE) {
     
    13121314            if (!typeSupplied) {
    13131315                type = defaults.type;
    13141316            }
     1317            if (!versionSupplied) {
     1318                version = defaults.version;
     1319            }
    13151320        }
    13161321        final Pathname p;
    13171322        final boolean logical;
     
    13851390                p.type = type;
    13861391            }
    13871392        }
     1393       
    13881394        p.version = version;
    13891395        return p;
    13901396    }
  • src/org/armedbear/lisp/top-level.lisp

    diff -r 8d33f6ebc961 src/org/armedbear/lisp/top-level.lisp
    a b  
    419419              (results (multiple-value-list (sys:interactive-eval form))))
    420420         (dolist (result results)
    421421           (fresh-line out)
    422            (prin1 result out)))))
     422           (pprint result out)))))
    423423
    424424(defun top-level-loop ()
    425425  (fresh-line)
  • test/lisp/abcl/pathname-tests.lisp

    diff -r 8d33f6ebc961 test/lisp/abcl/pathname-tests.lisp
    a b  
    17171717(deftest pathname.make-pathname.1
    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     
     1728 No newline at end of file