Changeset 12131 in project


Ignore:
Timestamp:
10/09/08 12:46:42 (12 years ago)
Author:
felix winkelmann
Message:

disabled invalid test; regex fixes - at least string-match-positions doesn't seem to return the same results

Location:
chicken/branches/irregular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/irregular/regex.scm

    r12124 r12131  
    7676      opts))) )
    7777
     78(define (unregexp x)
     79  (cond ((regexp? x) (regexp-x x))
     80        ((irregex? x) x)
     81        (else (irregex x))))
     82
    7883(define (string-match rx str)
    79   (let ((rx (irregex rx)))
     84  (let ((rx (unregexp rx)))
    8085    (and-let* ((m (irregex-match rx str)))
    8186      (let ((n (irregex-submatches rx)))
     
    8893
    8994(define (string-match-positions rx str)
    90   (let ((rx (irregex rx)))
     95  (let ((rx (unregexp rx)))
    9196    (and-let* ((m (irregex-match rx str)))
    9297      (let ((n (irregex-submatches m)))
     
    102107
    103108(define (string-search rx str #!optional (start 0) (range (string-length str)))
    104   (let ((rx (irregex rx)))
     109  (let ((rx (unregexp rx)))
    105110    (and-let* ((m (irregex-search rx str start (fx+ start range))))
    106111      (let loop ((i (irregex-submatches rx))
     
    112117
    113118(define (string-search-positions rx str #!optional (start 0) (range (string-length str)))
    114   (let ((rx (irregex rx)))
     119  (let ((rx (unregexp rx)))
    115120    (and-let* ((m (irregex-search rx str start (fx+ start range))))
    116121      (let loop ((i (irregex-submatches rx))
  • chicken/branches/irregular/tests/re-tests.txt

    r12124 r12131  
    119119(bc+d$|ef*g.|h?i(j|k))  bcdd    n       -       -
    120120(bc+d$|ef*g.|h?i(j|k))  reffgz  y       &-\1-\2 effgz-effgz-
    121 ((((((((((a))))))))))   -       c       -       -
    122121(((((((((a)))))))))     a       y       &       a
    123122multiple words of text  uh-uh   n       -       -
Note: See TracChangeset for help on using the changeset viewer.