From c898af13a671ee92a056467d324f16823594eb1c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 29 Jan 2022 17:08:33 -0500 Subject: tests: Add a test for posix-basic alternation --- tests.sh | 5 +++++ tests/test_regex_alternation.out | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 tests/test_regex_alternation.out diff --git a/tests.sh b/tests.sh index c0a3a79..2907678 100755 --- a/tests.sh +++ b/tests.sh @@ -622,6 +622,7 @@ gnu_tests=( test_regex test_regex_parens test_regex_error + test_regex_alternation test_regextype_posix_basic test_regextype_posix_extended @@ -2035,6 +2036,10 @@ function test_regextype_posix_basic() { bfs_diff -regextype posix-basic -regex '\./\((\)' } +function test_regex_alternation() { + bfs_diff basic -regextype posix-basic -regex 'basic/\(a\|b\)' +} + function test_regextype_posix_extended() { cd weirdnames bfs_diff -regextype posix-extended -regex '\./(\()' diff --git a/tests/test_regex_alternation.out b/tests/test_regex_alternation.out new file mode 100644 index 0000000..e2bc098 --- /dev/null +++ b/tests/test_regex_alternation.out @@ -0,0 +1,2 @@ +basic/a +basic/b -- cgit v1.2.3