Fix CL:MAKE-PATHNAME for explicit NIL host

parent 1f0a1531
......@@ -8,6 +8,8 @@ Unreleased
Fixes
-----
* Fix CL:MAKE-PATHNAME for explicitly nil HOST
* JNEW-RUNTIME-CLASS
* Fix CL:OPEN for :DIRECTION :INPUT (pipping)
......
......@@ -63,6 +63,21 @@
#+abcl
(:file "package-local-nicknames-tests")))))
(defsystem abcl/t
:description "Tests for ABCL via PROVE."
:defsystem-depends-on (prove-asdf)
:depends-on (abcl
prove)
:perform (asdf:test-op (op c)
(uiop:symbol-call :prove-asdf :run-test-system c))
:components ((:module package
:pathname "t/"
:components ((:file "package")))
(:module build
:depends-on (package)
:pathname "t/"
:components ((:test-file "pathname")))))
;;;
;;; ASDF definitions and the ANSI-TEST suite
;;;
......
......@@ -1319,6 +1319,7 @@ public class Pathname extends LispObject {
return new Pathname(namestring);
}
static final Pathname _makePathname(LispObject[] args) {
if (args.length % 2 != 0) {
program_error("Odd number of keyword arguments.");
......@@ -1330,6 +1331,7 @@ public class Pathname extends LispObject {
LispObject type = NIL;
LispObject version = NIL;
Pathname defaults = null;
boolean hostSupplied = false;
boolean deviceSupplied = false;
boolean nameSupplied = false;
boolean typeSupplied = false;
......@@ -1340,6 +1342,7 @@ public class Pathname extends LispObject {
LispObject value = args[i + 1];
if (key == Keyword.HOST) {
host = value;
hostSupplied = true;
} else if (key == Keyword.DEVICE) {
device = value;
deviceSupplied = true;
......@@ -1384,7 +1387,7 @@ public class Pathname extends LispObject {
}
}
if (defaults != null) {
if (host == NIL) {
if (!hostSupplied) {
host = defaults.host;
}
if (!directorySupplied) {
......
......@@ -3,5 +3,7 @@
(:export
#:install))
(defpackage abcl/test
(:use :cl :prove))
(in-package abcl/test)
(plan 1)
(let* ((uri #p"http://example.org/directory/name.version")
(p (make-pathname :host nil :defaults uri)))
(like (namestring p) "^/directory/name.version$"))
(finalize)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment