Changeset 25923 in project


Ignore:
Timestamp:
02/19/12 04:46:02 (9 years ago)
Author:
Ivan Raikov
Message:

filepath: fixed a bug in is-relative-drive (thanks to Christian Kellermann for reporting the issue)

Location:
release/4/filepath/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/filepath/trunk/filepath.scm

    r24508 r25923  
    625625
    626626(define (is-relative-drive? p)
    627   (not (is-path-separator? (last (first (read-drive-letter p))))))
     627  (or (null? p)
     628      (let ((p1 (read-drive-letter p)))
     629        (not (is-path-separator? (or (and p1 (last (first p1)))
     630                                     (first p))))
     631        )))
    628632
    629633(define (is-absolute? p)
  • release/4/filepath/trunk/filepath.setup

    r24508 r25923  
    1616
    1717  ;; Assoc list with properties for your extension:
    18   '((version 1.3)
     18  '((version 1.5)
    1919    ))
    2020
  • release/4/filepath/trunk/tests/run.scm

    r24508 r25923  
    252252            )
    253253
     254(test-group "is-relative?"
     255            (filepath:posix #f)
     256            (test-assert (filepath:is-relative? ""))
     257            (test-assert (filepath:is-relative? "path\\test"))
     258            (test-assert (not (filepath:is-relative? "c:\\test")))
     259            (test-assert (filepath:is-relative? "c:test"))
     260            (test-assert (filepath:is-relative? "c:"))
     261            (test-assert (not (filepath:is-relative? "\\\\foo")))
     262            (test-assert (filepath:is-relative? "/foo"))
     263            (filepath:posix #t)
     264            (test-assert (filepath:is-relative? "test/path"))
     265            (test-assert (not (filepath:is-relative? "/test")))
     266            )
     267           
     268
    254269(test-exit)
Note: See TracChangeset for help on using the changeset viewer.