]>
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() { | |
4d645342 ML |
9 | let output = Command::new("faketime") |
10 | .env("TZ", "Europe/Vienna") | |
11 | .arg("2023-06-28 23:59:59") | |
12 | .arg(utils::log_tracker_path()) | |
bc64fc80 ML |
13 | .arg("-vv") |
14 | .arg("-s") | |
15 | .arg("2023-06-23 00:00:00") | |
16 | .arg("-e") | |
17 | .arg("2023-06-23 23:59:00") | |
18 | .arg("-i") | |
19 | .arg("tests/test_input_time_rfc3339_mixed") | |
20 | .output() | |
21 | .expect("failed to execute pmg-log-tracker"); | |
22 | ||
23 | let expected_file = | |
24 | File::open("tests/test_output_time_rfc3339_mixed").expect("failed to open test_output"); | |
25 | ||
26 | let expected_output = BufReader::new(&expected_file); | |
27 | let output_reader = BufReader::new(&output.stdout[..]); | |
28 | utils::compare_output(output_reader, expected_output); | |
29 | } |