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

Function test_options_chaining

atomic-core/src/record/detect.rs:874–887  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

872
873 #[test]
874 fn test_options_chaining() {
875 let opts = DetectOptions::new()
876 .with_algorithm(Algorithm::Patience)
877 .with_check_mtime(false)
878 .with_detect_moves(false)
879 .with_prefix("test/")
880 .with_force_rediff(true);
881
882 assert_eq!(opts.algorithm, Algorithm::Patience);
883 assert!(!opts.check_mtime);
884 assert!(!opts.detect_moves);
885 assert_eq!(opts.prefix, "test/");
886 assert!(opts.force_rediff);
887 }
888
889 #[test]
890 fn test_options_matches_prefix_empty() {

Callers

nothing calls this directly

Calls 5

with_force_rediffMethod · 0.45
with_prefixMethod · 0.45
with_detect_movesMethod · 0.45
with_check_mtimeMethod · 0.45
with_algorithmMethod · 0.45

Tested by

no test coverage detected