Changeset 12291 in project for release/3/filepath/trunk/filepath.scm


Ignore:
Timestamp:
10/29/08 03:17:33 (13 years ago)
Author:
Ivan Raikov
Message:

Completed porting the test cases from FilePath?.hs

File:
1 edited

Legend:

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

    r12289 r12291  
    231231
    232232(define (split-all-extensions p)
    233   (match-let (((a b)  (split-file-name p)))
    234     (match (scatter is-ext-separator? b)
    235            ((c . d)  (list a (intersperse b (ext-separator))))
    236            (else     (list p (list))))))
     233  (let ((pcs (if (string? p) (string->list p) p)))
     234    (match-let (((a b)  (split-file-name pcs)))
     235               (match (scatter is-ext-separator? b)
     236                      ((c d . e) (list (concatenate (append a (list c)))
     237                                       (concatenate (intersperse (cons d e) (list (ext-separator))))))
     238                      (else       (list pcs (list)))))))
    237239
    238240(define (drop-all-extensions p)
     
    572574
    573575(define (is-bad-elem? x)
    574   (member (map char-upcase (drop-all-extensions x)) bad-elems))
     576  (let ((x1 (map char-upcase (drop-all-extensions x))))
     577    (member x1 bad-elems)))
    575578
    576579(define (is-valid? p)
     
    656659
    657660(define (list-wrapper lst)
    658   (begin ; (print "lst = " lst)
    659          (map list->string lst)))
     661  (map list->string lst))
    660662
    661663  ;; Path methods (environment $PATH)
Note: See TracChangeset for help on using the changeset viewer.