1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00
ripgrep/tests
Andrew Gallant 805fa32d18 searcher: work around NUL line terminator bug
As the FIXME comment says, ripgrep is not yet using the new line
terminator option in regex-automata exposed for exactly this purpose.
Because of that, line anchors like `(?m:^)` and `(?m:$)` will only match
`\n` as a line terminator. This means that when --null-data is used in
combination with --line-regexp, the anchors inserted by --line-regexp
will not match correctly. This is only a big deal in the "fast" path,
which requires the regex engine to deal with line terminators itself
correctly. The slow path strips line terminators regardless of what they
are, and so the line anchors can match (begin/end of haystack).

Fixes #2658
2023-11-27 21:17:12 -05:00
..
data tests: fix tests for buffer size change 2021-03-23 18:14:18 -04:00
binary.rs tests: fix tests for buffer size change 2021-03-23 18:14:18 -04:00
feature.rs log: add message when a binary file is skipped 2023-11-25 15:03:53 -05:00
hay.rs tests: re-tool integration tests 2018-08-20 07:10:19 -04:00
json.rs cli: replace clap with lexopt and supporting code 2023-11-20 23:51:53 -05:00
macros.rs style: rustfmt everything 2020-02-17 19:24:53 -05:00
misc.rs progress 2023-10-09 20:29:52 -04:00
multiline.rs printer: vimgrep now only prints one line 2021-05-31 21:51:18 -04:00
regression.rs searcher: work around NUL line terminator bug 2023-11-27 21:17:12 -05:00
tests.rs binary: rejigger ripgrep's handling of binary files 2019-04-14 19:29:27 -04:00
util.rs cli: replace clap with lexopt and supporting code 2023-11-20 23:51:53 -05:00