]>
Commit | Line | Data |
---|---|---|
bc64fc80 ML |
1 | use std::fs::File; |
2 | use std::io::BufReader; | |
3 | use std::process::Command; | |
4 | ||
5 | mod utils; | |
6 | ||
7 | #[test] | |
8 | fn after_queue_time_rfc3339_mixed() { | |
9 | let output = Command::new(utils::log_tracker_path()) | |
10 | .arg("-vv") | |
11 | .arg("-s") | |
12 | .arg("2023-06-23 00:00:00") | |
13 | .arg("-e") | |
14 | .arg("2023-06-23 23:59:00") | |
15 | .arg("-i") | |
16 | .arg("tests/test_input_time_rfc3339_mixed") | |
17 | .output() | |
18 | .expect("failed to execute pmg-log-tracker"); | |
19 | ||
20 | let expected_file = | |
21 | File::open("tests/test_output_time_rfc3339_mixed").expect("failed to open test_output"); | |
22 | ||
23 | let expected_output = BufReader::new(&expected_file); | |
24 | let output_reader = BufReader::new(&output.stdout[..]); | |
25 | utils::compare_output(output_reader, expected_output); | |
26 | } |