()
| 978 | |
| 979 | #[test] |
| 980 | fn test_detect_context_with_options() { |
| 981 | let txn = MockTxn; |
| 982 | let working_copy = Memory::new(); |
| 983 | let change_store = MemoryChangeStore::new(); |
| 984 | |
| 985 | let options = DetectOptions::new() |
| 986 | .with_algorithm(Algorithm::Patience) |
| 987 | .with_check_mtime(false) |
| 988 | .with_prefix("src/"); |
| 989 | |
| 990 | let ctx = DetectContext::new(&txn, &working_copy, &change_store).with_options(options); |
| 991 | |
| 992 | assert_eq!(ctx.algorithm(), Algorithm::Patience); |
| 993 | assert!(!ctx.check_mtime()); |
| 994 | assert_eq!(ctx.prefix(), "src/"); |
| 995 | } |
| 996 | |
| 997 | #[test] |
| 998 | fn test_detect_context_clone() { |
nothing calls this directly
no test coverage detected