Skip to content

Commit e9dbd7f

Browse files
committed
feat: Add test for multiple include filters
1 parent 219269a commit e9dbd7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tests.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,19 @@ fn copy_include() {
104104
create_dir_all(src).unwrap();
105105
File::create(format!("{}/foo", src)).unwrap();
106106
File::create(format!("{}/bar", src)).unwrap();
107+
File::create(format!("{}/baz", src)).unwrap();
107108

108109
CopyBuilder::new(src, dst)
109110
.overwrite(true)
110111
.overwrite_if_newer(true)
111112
.with_include_filter("foo")
113+
.with_include_filter("baz")
112114
.run()
113115
.unwrap();
114116

115117
assert!(Path::new(&format!("{}/foo", dst)).is_file());
116-
assert!(!Path::new(&format!("{}/bar", dst)).is_file());
118+
assert!(!Path::new(&format!("{}/bar", dst)).exists());
119+
assert!(Path::new(&format!("{}/baz", dst)).exists());
117120

118121
// clean up
119122
std::fs::remove_dir_all(src).unwrap();

0 commit comments

Comments
 (0)