diff options
| author | doug <> | 2014-09-21 05:06:23 +0000 |
|---|---|---|
| committer | doug <> | 2014-09-21 05:06:23 +0000 |
| commit | a53ab35a157425f24f2ecc1c879119d6ab466343 (patch) | |
| tree | 7a968470cb9bf6f125cb4e127fa9da1a3c09a56e /src/regress/lib/libc/regex/tests | |
| parent | f030ebd6e5a2b5a2c1a69afffe78fecd4c76d717 (diff) | |
| download | openbsd-a53ab35a157425f24f2ecc1c879119d6ab466343.tar.gz openbsd-a53ab35a157425f24f2ecc1c879119d6ab466343.tar.bz2 openbsd-a53ab35a157425f24f2ecc1c879119d6ab466343.zip | |
Add support for word anchors \< and \> to regex regression tests.
These are copied from the existing [[:<:]] and [[:>:]] tests.
Diffstat (limited to 'src/regress/lib/libc/regex/tests')
| -rw-r--r-- | src/regress/lib/libc/regex/tests | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/regress/lib/libc/regex/tests b/src/regress/lib/libc/regex/tests index c827c868b7..449f624401 100644 --- a/src/regress/lib/libc/regex/tests +++ b/src/regress/lib/libc/regex/tests | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: tests,v 1.5 2004/11/29 16:50:31 otto Exp $ | 1 | # $OpenBSD: tests,v 1.6 2014/09/21 05:06:23 doug Exp $ |
| 2 | # $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $ | 2 | # $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $ |
| 3 | 3 | ||
| 4 | # regular expression test set | 4 | # regular expression test set |
| @@ -479,17 +479,29 @@ a.* &# (aZb)c aZb | |||
| 479 | 479 | ||
| 480 | # word boundaries (ick) | 480 | # word boundaries (ick) |
| 481 | [[:<:]]a & a a | 481 | [[:<:]]a & a a |
| 482 | \<a & a a | ||
| 482 | [[:<:]]a & ba | 483 | [[:<:]]a & ba |
| 484 | \<a & ba | ||
| 483 | [[:<:]]a & -a a | 485 | [[:<:]]a & -a a |
| 486 | \<a & -a a | ||
| 484 | a[[:>:]] & a a | 487 | a[[:>:]] & a a |
| 488 | a\> & a a | ||
| 485 | a[[:>:]] & ab | 489 | a[[:>:]] & ab |
| 490 | a\> & ab | ||
| 486 | a[[:>:]] & a- a | 491 | a[[:>:]] & a- a |
| 492 | a\> & a- a | ||
| 487 | [[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc abc | 493 | [[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc abc |
| 494 | \<a.c\> & axcd-dayc-dazce-abc abc | ||
| 488 | [[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc-q abc | 495 | [[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc-q abc |
| 496 | \<a.c\> & axcd-dayc-dazce-abc-q abc | ||
| 489 | [[:<:]]a.c[[:>:]] & axc-dayc-dazce-abc axc | 497 | [[:<:]]a.c[[:>:]] & axc-dayc-dazce-abc axc |
| 498 | \<a.c\> & axc-dayc-dazce-abc axc | ||
| 490 | [[:<:]]b.c[[:>:]] & a_bxc-byc_d-bzc-q bzc | 499 | [[:<:]]b.c[[:>:]] & a_bxc-byc_d-bzc-q bzc |
| 500 | \<b.c\> & a_bxc-byc_d-bzc-q bzc | ||
| 491 | [[:<:]].x..[[:>:]] & y_xa_-_xb_y-_xc_-axdc _xc_ | 501 | [[:<:]].x..[[:>:]] & y_xa_-_xb_y-_xc_-axdc _xc_ |
| 502 | \<.x..\> & y_xa_-_xb_y-_xc_-axdc _xc_ | ||
| 492 | [[:<:]]a_b[[:>:]] & x_a_b | 503 | [[:<:]]a_b[[:>:]] & x_a_b |
| 504 | \<a_b\> & x_a_b | ||
| 493 | 505 | ||
| 494 | # past problems, and suspected problems | 506 | # past problems, and suspected problems |
| 495 | (A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A]) - A1 A1 | 507 | (A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A]) - A1 A1 |
