1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

pr: Fixes after rebasing

Only the minimum needed to:
* Make everything compile without warnings
* Move files according to the new project structure
* Make tests pass
This commit is contained in:
Max Semenik 2021-03-26 10:35:51 +03:00
parent 75b35e6002
commit 62fe68850e
9 changed files with 76 additions and 59 deletions

View file

@ -1,9 +1,7 @@
extern crate chrono;
use common::util::*;
use crate::common::util::*;
use std::fs::metadata;
use test_pr::chrono::offset::Local;
use test_pr::chrono::DateTime;
use chrono::offset::Local;
use chrono::DateTime;
fn file_last_modified_time(ucmd: &UCommand, path: &str) -> String {
let tmp_dir_path = ucmd.get_full_fixture_path(path);
@ -243,10 +241,11 @@ fn test_with_no_header_trailer_option() {
let test_file_path = "test_one_page.log";
let expected_test_file_path = "test_one_page_no_ht.log.expected";
let mut scenario = new_ucmd!();
let value = file_last_modified_time(&scenario, test_file_path);
scenario
.args(&["-t", test_file_path])
.succeeds()
.stdout_is_fixture(expected_test_file_path);
.stdout_is_templated_fixture(expected_test_file_path, vec![(&"{last_modified_time}".to_string(), &value)]);
}
#[test]
@ -480,7 +479,7 @@ fn test_with_pr_core_utils_tests() {
arguments.extend(input_file.clone());
let mut scenario_with_args = scenario.args(&arguments);
let scenario_with_args = scenario.args(&arguments);
let scenario_with_expected_status = if return_code == 0 {
scenario_with_args.succeeds()

View file

@ -53,4 +53,5 @@ Mon Dec 10 11:42:58.960 Info: <Wi-Fi Menu Extra[335]> -[AirPortExtraImplementati
Mon Dec 10 11:42:59.155 Info: <Wi-Fi Menu Extra[335]> 802.1X changed
Mon Dec 10 11:42:59.157 Info: <Wi-Fi Menu Extra[335]> -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0
Mon Dec 10 11:42:59.159 Info: <Wi-Fi Menu Extra[335]> -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars
Mon Dec 10 11:42:59.352 Info: <Wi-Fi Menu Extra[335]> 802.1X changed
Mon Dec 10 11:42:59.352 Info: <Wi-Fi Menu Extra[335]> 802.1X changed