summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-02-04 11:23:27 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-02-04 11:28:22 -0500
commit2d4d6787c4bc62042be4a58a4791074ab2c6a89e (patch)
tree0753c783533afc2bc3362f73ba3e8c2e45f1e65b /tests.sh
parentd83ffb41c7f5d42bfb43a19e38ab3d1331f0d86e (diff)
downloadbfs-2d4d6787c4bc62042be4a58a4791074ab2c6a89e.tar.xz
regex: Add support for emacs and grep types
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh18
1 files changed, 18 insertions, 0 deletions
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 '\./\((\)'