We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
**
repo with test case here: https://github.com/azdavis/wax-trouble
tldr is: given this directory structure:
testing \ _ a \ _ foo.txt \ _ b \ _ foo.txt
and this rust code:
#[test] fn hm() { let all_foo = "**/foo.txt"; let pwd = std::env::current_dir().unwrap(); let testing_dir = pwd.join("testing"); let testing_dir = testing_dir.as_os_str().to_str().unwrap(); let glob_rooted_at_dir_walk_anything: Vec<_> = go(&format!("{testing_dir}/{all_foo}"), "."); let glob_un_rooted_walk_in_dir: Vec<_> = go(all_foo, &testing_dir); assert_eq!(glob_rooted_at_dir_walk_anything, glob_un_rooted_walk_in_dir); } pub fn go(glob: &str, walk: &str) -> Vec<std::path::PathBuf> { wax::Glob::new(glob) .unwrap() .walk(walk) .map(|x| x.unwrap().into_path()) .collect() }
i would expect the test to pass but it does not. it fails with:
thread 'hm' panicked at src/lib.rs:9:5: assertion `left == right` failed left: [] right: [".../wax-trouble/testing/a/foo.txt", ".../wax-trouble/testing/b/foo.txt"]
where ... is the absolute path containing the repo.
...
i would not expect the lhs (glob_rooted_at_dir_walk_anything) to be empty. i would expect it to be the same as the rhs (glob_un_rooted_walk_in_dir).
glob_rooted_at_dir_walk_anything
glob_un_rooted_walk_in_dir
The text was updated successfully, but these errors were encountered:
No branches or pull requests
repo with test case here: https://github.com/azdavis/wax-trouble
tldr is: given this directory structure:
and this rust code:
i would expect the test to pass but it does not. it fails with:
where
...
is the absolute path containing the repo.i would not expect the lhs (
glob_rooted_at_dir_walk_anything
) to be empty. i would expect it to be the same as the rhs (glob_un_rooted_walk_in_dir
).The text was updated successfully, but these errors were encountered: