source: trunk/abcl/t/namestring.lisp

Last change on this file was 15784, checked in by Mark Evenson, 3 weeks ago

PARSE-NAMESTRING fails to explicitly denote current directory

Test for failure; no implementation.

c.f. <https://github.com/armedbear/abcl/issues/656>

File size: 1.4 KB
Line 
1;;;; <https://github.com/armedbear/abcl/issues/656>
2#|
3(parse-namestring "./foo") evaluates to #p"foo", instead of #p"./foo".
4
5Most Lisp implementation evaluate to #p"./foo", but I don't think this is in the standard.
6
7ABCL supports current directory in paths though, using make-pathname:
8
9(make-pathname :directory '(:relative ".") :name "foo") => #P"./foo".
10
11So 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
46P"./foo"
47Type: PATHNAME
48Class: #<BUILT-IN-CLASS PATHNAME>
49TYPE: (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--------------------
60A pathname.
61Namestring: "foo"
62Host: NIL
63Device: NIL
64Directory: (:RELATIVE)
65Name: "foo"
66Type: NIL
67Version: :NEWEST
68
69|#
70
71(prove:finalize)
Note: See TracBrowser for help on using the repository browser.