[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: ptx: check that invalid regular expressions are diagnosed
|
From: |
Collin Funk |
|
Subject: |
[PATCH] tests: ptx: check that invalid regular expressions are diagnosed |
|
Date: |
Thu, 11 Jun 2026 21:45:49 -0700 |
* tests/ptx/ptx.pl (@Tests): Add two test test cases.
---
tests/ptx/ptx.pl | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/ptx/ptx.pl b/tests/ptx/ptx.pl
index 1561996ca..625a6c6bf 100755
--- a/tests/ptx/ptx.pl
+++ b/tests/ptx/ptx.pl
@@ -53,6 +53,13 @@ my @Tests =
["S-infloop", '-S \^', {IN=>"a\n"}, {EXIT=>1},
{ERR_SUBST=>'s/^.*reg.*ex.*length zero.*$/regexlzero/'},
{ERR=>"regexlzero\n"}],
+
+["S-bad-regex", '-S [', {IN=>"a\n"}, {EXIT=>1},
+ {ERR=> ("$prog: Invalid regular " .
+ "expression (for regexp '[')\n")}],
+["W-bad-regex", '-W [', {IN=>"a\n"}, {EXIT=>1},
+ {ERR=> ("$prog: Invalid regular " .
+ "expression (for regexp '[')\n")}],
);
@Tests = triple_test \@Tests;
--
2.54.0
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: ptx: check that invalid regular expressions are diagnosed,
Collin Funk <=