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:1085–1095  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1083
1084 #[test]
1085 fn test_options_should_include() {
1086 let opts = TreeCollectOptions::new()
1087 .prefix("src/")
1088 .include_hidden(false)
1089 .exclude("target/");
1090
1091 assert!(opts.should_include("src/main.rs"));
1092 assert!(!opts.should_include("tests/test.rs")); // wrong prefix
1093 assert!(!opts.should_include("src/.hidden")); // hidden
1094 assert!(!opts.should_include("target/debug")); // excluded
1095 }
1096
1097 #[test]
1098 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