()
| 25 | |
| 26 | #[test] |
| 27 | fn test_postprocessor_execute_simple_command() { |
| 28 | let cat_pp = PostProcessor::new("test_cat", "cat"); |
| 29 | let test_input = "Hello World\n"; |
| 30 | |
| 31 | let result = cat_pp.execute(test_input.to_string()); |
| 32 | |
| 33 | assert!(result.is_ok(), "cat should execute successfully"); |
| 34 | let output = result.unwrap(); |
| 35 | assert!( |
| 36 | output.trim_end().contains("Hello World"), |
| 37 | "output should contain input" |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | #[test] |
| 42 | fn test_postprocessor_execute_with_unavailable_processor() { |