ripgrep/tests
Andrew Gallant 4df1298127 globset: fix bug where trailing . in file name was incorrectly handled
I'm not sure why I did this, but I think I was trying to imitate the
contract of [`std::path::Path::file_name`]:

> Returns None if the path terminates in `..`.

But the status quo clearly did not implement this. And as a result, if
you have a glob that ends in a `.`, it was instead treated as the empty
string (which only matches the empty string).

We fix this by implementing the semantic from the standard library
correctly.

Fixes #2990

[`std::path::Path::file_name`]: https://doc.rust-lang.org/std/path/struct.Path.html#method.file_name
2025-09-19 21:08:19 -04:00
..
data tests: fix tests for buffer size change 2021-03-23 18:14:18 -04:00
binary.rs test: check binary file detection when using memory maps 2025-09-19 21:08:19 -04:00
feature.rs cli: prefix all non-fatal error messages with 'rg: ' 2024-01-06 14:15:52 -05:00
hay.rs tests: re-tool integration tests 2018-08-20 07:10:19 -04:00
json.rs style: simplify string formatting 2025-09-19 21:08:19 -04:00
macros.rs style: rustfmt everything 2020-02-17 19:24:53 -05:00
misc.rs ci: add more ARM build configurations to CI and release workflows 2024-01-06 10:21:34 -05:00
multiline.rs printer: vimgrep now only prints one line 2021-05-31 21:51:18 -04:00
regression.rs globset: fix bug where trailing . in file name was incorrectly handled 2025-09-19 21:08:19 -04:00
tests.rs binary: rejigger ripgrep's handling of binary files 2019-04-14 19:29:27 -04:00
util.rs style: simplify string formatting 2025-09-19 21:08:19 -04:00