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