Skip to content

Commit

Permalink
Add symlink test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Jan 2, 2024
1 parent 4054779 commit 476857f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/glob-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,22 @@ fn main() {
mk_file("r/three", true);
mk_file("r/three/c.md", false);

mk_file("dirsym", true);
mk_symlink_file("../r", "dirsym/link");

assert_eq!(
glob_vec("dirsym/**/*.md"),
vec!(
PathBuf::from("dirsym/link/another/a.md"),
PathBuf::from("dirsym/link/current_dir.md"),
PathBuf::from("dirsym/link/one/a.md"),
PathBuf::from("dirsym/link/one/another/a.md"),
PathBuf::from("dirsym/link/one/another/deep/spelunking.md"),
PathBuf::from("dirsym/link/three/c.md"),
PathBuf::from("dirsym/link/two/b.md")
)
);

// all recursive entities
assert_eq!(
glob_vec("r/**"),
Expand Down

0 comments on commit 476857f

Please sign in to comment.