diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-02-24 14:06:05 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-02-24 14:28:17 -0500 |
commit | b490dc534eedcc9878d4962e6d02baf4217a712f (patch) | |
tree | 708d96ae84732441bfa4b2e40d48e141e691f8a3 /tests.sh | |
parent | 0633154419955e35470b38aafd49b6f52510333a (diff) | |
download | bfs-b490dc534eedcc9878d4962e6d02baf4217a712f.tar.xz |
regex: Use the encoding from the current locale
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -625,6 +625,7 @@ gnu_tests=( test_regex test_regex_parens test_regex_error + test_regex_invalid_utf8 test_regextype_posix_basic test_regextype_posix_extended @@ -2146,6 +2147,17 @@ function test_regex_error() { fail quiet invoke_bfs basic -regex '[' } +function test_regex_invalid_utf8() { + rm -rf scratch/* + + # Incomplete UTF-8 sequences + skip_if fail quiet touch scratch/$'\xC3' + skip_if fail quiet touch scratch/$'\xE2\x84' + skip_if fail quiet touch scratch/$'\xF0\x9F\x92' + + bfs_diff scratch -regex 'scratch/..' +} + function test_E() { cd weirdnames bfs_diff -E . -regex '\./(\()' |