From 94aeba9854d4061846d89fd6c6b68e534245e65e Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Mon, 20 Mar 2023 16:06:56 +0100 Subject: [PATCH] tests: fix unused imports warnings on Windows --- tests/by-util/test_cat.rs | 4 +++- tests/by-util/test_dd.rs | 4 +++- tests/by-util/test_tail.rs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/by-util/test_cat.rs b/tests/by-util/test_cat.rs index ea4ea55d9..c32828a83 100644 --- a/tests/by-util/test_cat.rs +++ b/tests/by-util/test_cat.rs @@ -1,6 +1,8 @@ // spell-checker:ignore NOFILE -use crate::common::util::{vec_of_size, TestScenario}; +#[cfg(not(windows))] +use crate::common::util::vec_of_size; +use crate::common::util::TestScenario; #[cfg(any(target_os = "linux", target_os = "android"))] use rlimit::Resource; use std::fs::OpenOptions; diff --git a/tests/by-util/test_dd.rs b/tests/by-util/test_dd.rs index 6532c5325..99eae4809 100644 --- a/tests/by-util/test_dd.rs +++ b/tests/by-util/test_dd.rs @@ -1,6 +1,8 @@ // spell-checker:ignore fname, tname, fpath, specfile, testfile, unspec, ifile, ofile, outfile, fullblock, urand, fileio, atoe, atoibm, availible, behaviour, bmax, bremain, btotal, cflags, creat, ctable, ctty, datastructures, doesnt, etoa, fileout, fname, gnudd, iconvflags, iseek, nocache, noctty, noerror, nofollow, nolinks, nonblock, oconvflags, oseek, outfile, parseargs, rlen, rmax, rposition, rremain, rsofar, rstat, sigusr, sigval, wlen, wstat abcdefghijklm abcdefghi nabcde nabcdefg abcdefg -use crate::common::util::{TestScenario, UCommand, TESTS_BINARY}; +use crate::common::util::TestScenario; +#[cfg(not(windows))] +use crate::common::util::{UCommand, TESTS_BINARY}; use regex::Regex; diff --git a/tests/by-util/test_tail.rs b/tests/by-util/test_tail.rs index f40ee22a6..7c3a5156d 100644 --- a/tests/by-util/test_tail.rs +++ b/tests/by-util/test_tail.rs @@ -10,7 +10,9 @@ extern crate tail; use crate::common::random::{AlphanumericNewline, RandomString}; -use crate::common::util::{expected_result, is_ci, TestScenario}; +#[cfg(not(windows))] +use crate::common::util::is_ci; +use crate::common::util::{expected_result, TestScenario}; use pretty_assertions::assert_eq; use rand::distributions::Alphanumeric; use rstest::rstest;