* 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


Reply via email to