[gforth] / gforth / regexp-test.fs  

gforth: gforth/regexp-test.fs

Diff for /gforth/regexp-test.fs between version 1.10 and 1.11

version 1.10, Sat Sep 4 21:39:29 2010 UTC version 1.11, Sat Sep 4 22:27:22 2010 UTC
Line 118 
Line 118 
 s" bla baz bar" ?foos1  s" bla baz bar" ?foos1
 s" foofoofoo" ?foos1  s" foofoofoo" ?foos1
   
   \ buffer overrun test (bug in =")
   
    : ?long-string
       (( // \( =" abcdefghi" \) ))
       IF  \1 type  cr THEN ;
   
   here 4096 allocate throw 4096 + 8 - constant test-string
    s" abcdefgh" test-string swap cmove>
    .( provoking overflow [i.e. see valgrind output]) cr
    test-string . cr
    test-string 8 ?long-string
   .( done) cr
   
 \ simple replacement test  \ simple replacement test
   
 ." --- delnum test ---" cr  ." --- simple replacement test ---" cr
   
 : delnum  ( addr u -- addr' u' )   s// \d s" " //g ;  : delnum  ( addr u -- addr' u' )   s// \d s" " //g ;
 : test-delnum  ( addr u addr' u' -- )  : test-delnum  ( addr u addr' u' -- )
Line 133 
Line 146 
 s" a0"  s" a" test-delnum  s" a0"  s" a" test-delnum
 s" aa"  s" aa" test-delnum  s" aa"  s" aa" test-delnum
   
   : delcomment  ( addr u -- addr' u' )  s// ` # {** .? **}  s" " //g ;
   s" hello # test " delcomment type cr
   
 \ replacement tests  \ replacement tests
   
 ." --- replacement tests ---" cr  ." --- replacement tests ---" cr


Generate output suitable for use with a patch program
Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help