()
| 963 | |
| 964 | #[test] |
| 965 | fn test_detect_context_with_options() { |
| 966 | let txn = MockTxn; |
| 967 | let working_copy = Memory::new(); |
| 968 | let change_store = MemoryChangeStore::new(); |
| 969 | |
| 970 | let options = DetectOptions::new() |
| 971 | .with_algorithm(Algorithm::Patience) |
| 972 | .with_check_mtime(false) |
| 973 | .with_prefix("src/"); |
| 974 | |
| 975 | let ctx = DetectContext::new(&txn, &working_copy, &change_store).with_options(options); |
| 976 | |
| 977 | assert_eq!(ctx.algorithm(), Algorithm::Patience); |
| 978 | assert!(!ctx.check_mtime()); |
| 979 | assert_eq!(ctx.prefix(), "src/"); |
| 980 | } |
| 981 | |
| 982 | #[test] |
| 983 | fn test_detect_context_clone() { |
nothing calls this directly
no test coverage detected