unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* regexp-exec fails for long strings
@ 2002-04-25 20:05 Thien-Thi Nguyen
  2002-04-25 21:47 ` rm
  0 siblings, 1 reply; 7+ messages in thread
From: Thien-Thi Nguyen @ 2002-04-25 20:05 UTC (permalink / raw)
  Cc: guile-user

well, good and bad news.

the good news is that another guile project was recently added to the
projects list.  the bad news is that for www.gnu.org, template.scm now
fails due to unfulfilled regexp matching.  (this has resulted in an
empty project page there.)  below is a test case that demonstrates the
problem.  running "pre-inst-guile -s" on it shows three "ok" and three
"FAIL" for both HEAD and branch_release-1-6.

if someone can confirm similar behavior on another system (perhaps by
varying the appended string length), i will add this to the bugs db.
(i ask for this confirmation because my system's old sdrams are prone to
mysterious failures, and i want to rule that out as a reason.)

thi

____________________________________________
(use-modules (ice-9 regex))

(define ok "<section_name>Projects List</section_name>")

(define rx (make-regexp "<section_name>(.*)</section_name>"))

(define (+space s n)
  (string-append s (make-string n #\space)))

(define (test s)
  (format #t "string-length ~A\t=> ~A\n"
          (string-length s)
          (if (regexp-exec rx s)
              "ok"
              "FAIL")))

;; do it
(test ok)                               ; ok
(test (+space ok 11672))                ; ok
(test (+space ok 11673))                ; ok
(test (+space ok 11674))                ; FAIL
(test (+space ok 11675))                ; FAIL
(test (+space ok 11700))                ; FAIL

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-05-15  8:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-25 20:05 regexp-exec fails for long strings Thien-Thi Nguyen
2002-04-25 21:47 ` rm
2002-04-25 23:29   ` Thien-Thi Nguyen
2002-05-15  3:53     ` Thien-Thi Nguyen
2002-05-15  6:04       ` Wolfgang Jährling
2002-05-15  8:19         ` Thien-Thi Nguyen
2002-04-26  4:32   ` Tom Lord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).