Line | |
---|
1 | ;;;; <https://github.com/armedbear/abcl/issues/656> |
---|
2 | #| |
---|
3 | (parse-namestring "./foo") evaluates to #p"foo", instead of #p"./foo". |
---|
4 | |
---|
5 | Most Lisp implementation evaluate to #p"./foo", but I don't think this is in the standard. |
---|
6 | |
---|
7 | ABCL supports current directory in paths though, using make-pathname: |
---|
8 | |
---|
9 | (make-pathname :directory '(:relative ".") :name "foo") => #P"./foo". |
---|
10 | |
---|
11 | So it is only parse-namestring that would need to be modified. |
---|
12 | |# |
---|
13 | |
---|
14 | (prove:plan 1) |
---|
15 | |
---|
16 | (prove:is |
---|
17 | (pathname-directory (parse-namestring "./foo")) |
---|
18 | '(:relative ".") |
---|
19 | "Whether the namestring of current directory explicitly roundtrips") |
---|
20 | |
---|
21 | |
---|
22 | ;; (describe #p"./foo") |
---|
23 | #| ABCL |
---|
24 | #P"foo" is an object of type PATHNAME: |
---|
25 | HOST NIL |
---|
26 | DEVICE NIL |
---|
27 | DIRECTORY NIL |
---|
28 | NAME "foo" |
---|
29 | TYPE NIL |
---|
30 | VERSION NIL |
---|
31 | ; No value ; |
---|
32 | |# |
---|
33 | |
---|
34 | #| SBCL |
---|
35 | #P"./foo" |
---|
36 | [pathname] |
---|
37 | |
---|
38 | HOST = #<SB-IMPL::UNIX-HOST {70031676C3}> |
---|
39 | DIRECTORY = (:RELATIVE ".") |
---|
40 | NAME = "foo" |
---|
41 | VERSION = :NEWEST |
---|
42 | ; No value |
---|
43 | |# |
---|
44 | |
---|
45 | #| CCL |
---|
46 | P"./foo" |
---|
47 | Type: PATHNAME |
---|
48 | Class: #<BUILT-IN-CLASS PATHNAME> |
---|
49 | TYPE: (PATHNAME . #<CCL::CLASS-WRAPPER PATHNAME #x30004035E6DD>) |
---|
50 | %PATHNAME-DIRECTORY: (:RELATIVE ".") |
---|
51 | %PATHNAME-NAME: "foo" |
---|
52 | %PATHNAME-TYPE: NIL |
---|
53 | %PHYSICAL-PATHNAME-VERSION: :NEWEST |
---|
54 | %PHYSICAL-PATHNAME-DEVICE: NIL |
---|
55 | |# |
---|
56 | |
---|
57 | #| ECL |
---|
58 | #<pathname 0x107138140> |
---|
59 | -------------------- |
---|
60 | A pathname. |
---|
61 | Namestring: "foo" |
---|
62 | Host: NIL |
---|
63 | Device: NIL |
---|
64 | Directory: (:RELATIVE) |
---|
65 | Name: "foo" |
---|
66 | Type: NIL |
---|
67 | Version: :NEWEST |
---|
68 | |
---|
69 | |# |
---|
70 | |
---|
71 | (prove:finalize) |
---|
Note: See
TracBrowser
for help on using the repository browser.