MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_options_should_include

Function test_options_should_include

atomic-core/src/output/repo/tree.rs:1095–1105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1093
1094 #[test]
1095 fn test_options_should_include() {
1096 let opts = TreeCollectOptions::new()
1097 .prefix("src/")
1098 .include_hidden(false)
1099 .exclude("target/");
1100
1101 assert!(opts.should_include("src/main.rs"));
1102 assert!(!opts.should_include("tests/test.rs")); // wrong prefix
1103 assert!(!opts.should_include("src/.hidden")); // hidden
1104 assert!(!opts.should_include("target/debug")); // excluded
1105 }
1106
1107 #[test]
1108 fn test_options_path_depth() {

Callers

nothing calls this directly

Calls 3

include_hiddenMethod · 0.80
excludeMethod · 0.45
prefixMethod · 0.45

Tested by

no test coverage detected