()
| 1105 | |
| 1106 | #[test] |
| 1107 | fn test_options_exceeds_depth() { |
| 1108 | let opts = TreeCollectOptions::new().max_depth(2); |
| 1109 | |
| 1110 | assert!(!opts.exceeds_depth("file.txt")); // depth 1 |
| 1111 | assert!(!opts.exceeds_depth("a/b.txt")); // depth 2 |
| 1112 | assert!(opts.exceeds_depth("a/b/c.txt")); // depth 3 |
| 1113 | } |
| 1114 | |
| 1115 | #[test] |
| 1116 | fn test_options_exceeds_depth_unlimited() { |