mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests: fix warnings on OpenBSD for unused imports in by-util/test_*
Signed-off-by: Laurent Cheylus <foxy@free.fr>
This commit is contained in:
parent
c25ba39ce6
commit
008dd38a0d
5 changed files with 10 additions and 0 deletions
|
@ -11,11 +11,14 @@ use regex::Regex;
|
||||||
use crate::common::util::expected_result;
|
use crate::common::util::expected_result;
|
||||||
use crate::common::util::TestScenario;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
const SUB_DIR: &str = "subdir/deeper";
|
const SUB_DIR: &str = "subdir/deeper";
|
||||||
const SUB_DEEPER_DIR: &str = "subdir/deeper/deeper_dir";
|
const SUB_DEEPER_DIR: &str = "subdir/deeper/deeper_dir";
|
||||||
const SUB_DIR_LINKS: &str = "subdir/links";
|
const SUB_DIR_LINKS: &str = "subdir/links";
|
||||||
const SUB_DIR_LINKS_DEEPER_SYM_DIR: &str = "subdir/links/deeper_dir";
|
const SUB_DIR_LINKS_DEEPER_SYM_DIR: &str = "subdir/links/deeper_dir";
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
const SUB_FILE: &str = "subdir/links/subwords.txt";
|
const SUB_FILE: &str = "subdir/links/subwords.txt";
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
const SUB_LINK: &str = "subdir/links/sublink.txt";
|
const SUB_LINK: &str = "subdir/links/sublink.txt";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
// spell-checker:ignore (words) helloworld nodir objdump n'source
|
// spell-checker:ignore (words) helloworld nodir objdump n'source
|
||||||
|
|
||||||
use crate::common::util::{is_ci, run_ucmd_as_root, TestScenario};
|
use crate::common::util::{is_ci, run_ucmd_as_root, TestScenario};
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
use filetime::FileTime;
|
use filetime::FileTime;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::os::unix::fs::{MetadataExt, PermissionsExt};
|
use std::os::unix::fs::{MetadataExt, PermissionsExt};
|
||||||
|
|
|
@ -15,6 +15,7 @@ use crate::common::util::TestScenario;
|
||||||
#[cfg(all(unix, feature = "chmod"))]
|
#[cfg(all(unix, feature = "chmod"))]
|
||||||
use nix::unistd::{close, dup};
|
use nix::unistd::{close, dup};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
// spell-checker:ignore winsize Openpty openpty xpixel ypixel ptyprocess
|
// spell-checker:ignore winsize Openpty openpty xpixel ypixel ptyprocess
|
||||||
use crate::common::util::TestScenario;
|
use crate::common::util::TestScenario;
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
|
|
||||||
// General observation: nohup.out will not be created in tests run by cargo test
|
// General observation: nohup.out will not be created in tests run by cargo test
|
||||||
|
|
|
@ -3,8 +3,12 @@
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
|
|
||||||
|
#[cfg(target_os = "openbsd")]
|
||||||
|
use crate::common::util::TestScenario;
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
use crate::common::util::{expected_result, TestScenario};
|
use crate::common::util::{expected_result, TestScenario};
|
||||||
use pinky::Capitalize;
|
use pinky::Capitalize;
|
||||||
|
#[cfg(not(target_os = "openbsd"))]
|
||||||
use uucore::entries::{Locate, Passwd};
|
use uucore::entries::{Locate, Passwd};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue