Skip to content
Discussion options

You must be logged in to vote

In the future, please provide a more straight-forward MRE. And in particular, you don't include output that shows how your test failed. Just that it did. For example:

$ mkdir -p /tmp/ripgrep-d3128/ignore-test-fs/target
$ cd /tmp/ripgrep-d3128
$ echo '/target' > ignore-test-fs/.gitignore
$ touch ignore-test-fs/target/file.txt

And then:

$ cat Cargo.toml
[package]
publish = false
name = "ripgrep-d3128"
version = "0.1.0"
edition = "2024"

[lib]
path = "lib.rs"

[dependencies]
anyhow = "1.0.99"
ignore = "0.4.23"

[profile.release]
debug = true

$ cat lib.rs
#[cfg(test)]
mod tests {
    use ignore::{gitignore::Gitignore, Walk};

    #[test]
    fn ignore_by_walking() {
        assert_eq!(Walk:…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@matx64
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants