From cefc4f673629beb867df0eae85bdabf45f688bfc Mon Sep 17 00:00:00 2001 From: Niyaz Nigmatullin Date: Mon, 17 Oct 2022 23:30:59 +0300 Subject: [PATCH] tests: fixed some tests on Windows Tests used to use system `touch` and `ls` instead of testing bench `fixtures.touch` and `uu_ls` --- tests/by-util/test_mkdir.rs | 2 +- tests/by-util/test_test.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/by-util/test_mkdir.rs b/tests/by-util/test_mkdir.rs index 0a9d9f4d4..59546b847 100644 --- a/tests/by-util/test_mkdir.rs +++ b/tests/by-util/test_mkdir.rs @@ -159,7 +159,7 @@ fn test_mkdir_trailing_dot() { .arg(TEST_DIR11) .succeeds() .stdout_contains("created directory 'mkdir_test11'"); - let result = scene2.cmd("ls").arg("-al").run(); + let result = scene2.ucmd().arg("-al").run(); println!("ls dest {}", result.stdout_str()); } diff --git a/tests/by-util/test_test.rs b/tests/by-util/test_test.rs index 6aa43133c..ff1a49ba1 100644 --- a/tests/by-util/test_test.rs +++ b/tests/by-util/test_test.rs @@ -393,9 +393,9 @@ fn test_same_device_inode() { fn test_newer_file() { let scenario = TestScenario::new(util_name!()); - scenario.cmd("touch").arg("regular_file").succeeds(); + scenario.fixtures.touch("regular_file"); sleep(std::time::Duration::from_millis(1000)); - scenario.cmd("touch").arg("newer_file").succeeds(); + scenario.fixtures.touch("newer_file"); scenario .ucmd()