diff options
author | Brian Malehorn <bmalehorn@gmail.com> | 2018-02-22 23:15:16 -0800 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-03-10 09:30:55 -0500 |
commit | 91d0756f62790356012d692a7b340df92b54beac (patch) | |
tree | ea9cfa47cd6658bb27bd7ebed1b0b44b60a9f99e /tests | |
parent | 54256515b49595a2ac4c2b218e4ddbb5a4920d9b (diff) |
ignore: support backslash escaping
Use the new `Globset::backslash_escape` knob to conform to git behavior:
`\` will escape the following character. For example, the pattern `\*`
will match a file literally named `*`.
Also tweak a test in ripgrep that was relying on this incorrect
behavior.
Closes #526, Closes #811
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 34bf08e4..6becfe0f 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -800,11 +800,7 @@ clean!(regression_25, "test", ".", |wd: WorkDir, mut cmd: Command| { // See: https://github.com/BurntSushi/ripgrep/issues/30 clean!(regression_30, "test", ".", |wd: WorkDir, mut cmd: Command| { - if cfg!(windows) { - wd.create(".gitignore", "vendor/**\n!vendor\\manifest"); - } else { - wd.create(".gitignore", "vendor/**\n!vendor/manifest"); - } + wd.create(".gitignore", "vendor/**\n!vendor/manifest"); wd.create_dir("vendor"); wd.create("vendor/manifest", "test"); |