aboutsummaryrefslogtreecommitdiffstats
path: root/common/t-recsel.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/t-recsel.c')
-rw-r--r--common/t-recsel.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/common/t-recsel.c b/common/t-recsel.c
index 2d5a95d25..ff68e54c3 100644
--- a/common/t-recsel.c
+++ b/common/t-recsel.c
@@ -225,9 +225,27 @@ run_test_2 (void)
if (!recsel_select (se, test_2_getval, NULL))
fail (0, 0);
FREEEXPR();
- ADDEXPR ("uid =~ @");
+ ADDEXPR ("uid !~ @");
+ if (recsel_select (se, test_2_getval, NULL))
+ fail (0, 0);
+
+ FREEEXPR();
+ ADDEXPR ("uid =~ foo@");
+ if (!recsel_select (se, test_2_getval, NULL))
+ fail (0, 0);
+ FREEEXPR();
+ ADDEXPR ("uid =~ oo@");
+ if (!recsel_select (se, test_2_getval, NULL))
+ fail (0, 0);
+ FREEEXPR();
+ /* Again but with left anchored substring. */
+ ADDEXPR ("-^ uid =~ foo@");
if (!recsel_select (se, test_2_getval, NULL))
fail (0, 0);
+ FREEEXPR();
+ ADDEXPR ("-^ uid =~ oo@");
+ if (recsel_select (se, test_2_getval, NULL))
+ fail (0, 0);
FREEEXPR();
ADDEXPR ("keyid == 0x12345678");