Skip to content

Commit

Permalink
tests: add test case
Browse files Browse the repository at this point in the history
The test case makes sure that the dot (.) in a regexp doesn't match unicode characters by default.
  • Loading branch information
plusvic committed Apr 2, 2024
1 parent 3c1d700 commit e3d7d05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ fn string_operations() {
// a single byte, not a character. By turning on unicode support
// with the `(?u)` prefix we make the dot to match unicode
// characters.
condition_false!(r#""πŸ™ˆπŸ™‰πŸ™Š" matches /^...$/"#);
condition_true!(r#""πŸ™ˆπŸ™‰πŸ™Š" matches /(?u)^...$/"#);
}

Expand Down

0 comments on commit e3d7d05

Please sign in to comment.