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

Function test_options_chaining

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

Source from the content-addressed store, hash-verified

1026
1027 #[test]
1028 fn test_options_chaining() {
1029 let opts = TreeCollectOptions::new()
1030 .prefix("src/")
1031 .include_hidden(false)
1032 .max_depth(5)
1033 .collect_directories(true)
1034 .collect_files(true)
1035 .exclude("target/");
1036
1037 assert_eq!(opts.prefix, "src/");
1038 assert!(!opts.include_hidden);
1039 assert_eq!(opts.max_depth, Some(5));
1040 assert!(opts.collect_directories);
1041 assert!(opts.collect_files);
1042 assert_eq!(opts.exclude_patterns.len(), 1);
1043 }
1044
1045 #[test]
1046 fn test_options_matches_prefix_empty() {

Callers

nothing calls this directly

Calls 6

collect_filesMethod · 0.80
collect_directoriesMethod · 0.80
max_depthMethod · 0.80
include_hiddenMethod · 0.80
excludeMethod · 0.45
prefixMethod · 0.45

Tested by

no test coverage detected