From 2d4d6787c4bc62042be4a58a4791074ab2c6a89e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 4 Feb 2022 11:23:27 -0500 Subject: regex: Add support for emacs and grep types --- tests.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index 940187e..c83b6c6 100755 --- a/tests.sh +++ b/tests.sh @@ -624,6 +624,8 @@ gnu_tests=( test_regextype_posix_basic test_regextype_posix_extended test_regextype_ed + test_regextype_emacs + test_regextype_grep test_regextype_sed test_samefile @@ -2107,6 +2109,22 @@ function test_regextype_ed() { bfs_diff -regextype ed -regex '\./\((\)' } +function test_regextype_emacs() { + if fail quiet invoke_bfs -regextype emacs -quit; then + return 0 + fi + + bfs_diff basic -regextype emacs -regex '.*/\(f+o?o?\|bar\)' +} + +function test_regextype_grep() { + if fail quiet invoke_bfs -regextype grep -quit; then + return 0 + fi + + bfs_diff basic -regextype grep -regex '.*/f\+o\?o\?' +} + function test_regextype_sed() { cd weirdnames bfs_diff -regextype sed -regex '\./\((\)' -- cgit v1.2.3