mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 14:52:41 +00:00
tests: expand wildcard imports
This commit is contained in:
parent
b8f2f295a6
commit
6988eb7ec6
100 changed files with 107 additions and 107 deletions
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_arch() {
|
fn test_arch() {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// that was distributed with this source code.
|
// that was distributed with this source code.
|
||||||
//
|
//
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_encode() {
|
fn test_encode() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_encode() {
|
fn test_encode() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) reallylongexecutable
|
// spell-checker:ignore (words) reallylongexecutable
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
#[cfg(any(unix, target_os = "redox"))]
|
#[cfg(any(unix, target_os = "redox"))]
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_z85_not_padded() {
|
fn test_z85_not_padded() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore NOFILE
|
// spell-checker:ignore NOFILE
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{vec_of_size, TestScenario};
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
use rlimit::Resource;
|
use rlimit::Resource;
|
||||||
use std::fs::OpenOptions;
|
use std::fs::OpenOptions;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// spell-checker:ignore (words) nosuchgroup groupname
|
// spell-checker:ignore (words) nosuchgroup groupname
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use rust_users::*;
|
use rust_users::get_effective_gid;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_option() {
|
fn test_invalid_option() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::{AtPath, TestScenario, UCommand};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::fs::{metadata, set_permissions, OpenOptions, Permissions};
|
use std::fs::{metadata, set_permissions, OpenOptions, Permissions};
|
||||||
use std::os::unix::fs::{OpenOptionsExt, PermissionsExt};
|
use std::os::unix::fs::{OpenOptionsExt, PermissionsExt};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) agroupthatdoesntexist auserthatdoesntexist cuuser groupname notexisting passgrp
|
// spell-checker:ignore (words) agroupthatdoesntexist auserthatdoesntexist cuuser groupname notexisting passgrp
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{is_ci, run_ucmd_as_root, CmdResult, TestScenario};
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
use rust_users::get_effective_uid;
|
use rust_users::get_effective_uid;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) araba newroot userspec chdir pwd's isroot
|
// spell-checker:ignore (words) araba newroot userspec chdir pwd's isroot
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{is_ci, run_ucmd_as_root, TestScenario};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) asdf
|
// spell-checker:ignore (words) asdf
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) defaultcheck nocheck
|
// spell-checker:ignore (words) defaultcheck nocheck
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (flags) reflink (fs) tmpfs (linux) rlimit Rlim NOFILE clob btrfs ROOTDIR USERDIR procfs outfile
|
// spell-checker:ignore (flags) reflink (fs) tmpfs (linux) rlimit Rlim NOFILE clob btrfs ROOTDIR USERDIR procfs outfile
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
use std::fs::set_permissions;
|
use std::fs::set_permissions;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use glob::glob;
|
use glob::glob;
|
||||||
|
|
||||||
/// Returns a string of numbers with the given range, each on a new line.
|
/// Returns a string of numbers with the given range, each on a new line.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
static INPUT: &str = "lists.txt";
|
static INPUT: &str = "lists.txt";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
|
|
||||||
use self::regex::Regex;
|
use self::regex::Regex;
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
#[cfg(all(unix, not(target_os = "macos")))]
|
#[cfg(all(unix, not(target_os = "macos")))]
|
||||||
use rust_users::*;
|
use rust_users::get_effective_uid;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// 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
|
// 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::*;
|
use crate::common::util::{TestScenario, UCommand, TESTS_BINARY};
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// spell-checker:ignore udev pcent iuse itotal iused ipcent
|
// spell-checker:ignore udev pcent iuse itotal iused ipcent
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ extern crate regex;
|
||||||
extern crate tempfile;
|
extern crate tempfile;
|
||||||
|
|
||||||
use self::regex::Regex;
|
use self::regex::Regex;
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* As dir use the same functions than ls, we don't have to retest them here.
|
* As dir use the same functions than ls, we don't have to retest them here.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// spell-checker:ignore overridable
|
// spell-checker:ignore overridable
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
extern crate dircolors;
|
extern crate dircolors;
|
||||||
use self::dircolors::{guess_syntax, OutputFmt, StrUtils};
|
use self::dircolors::{guess_syntax, OutputFmt, StrUtils};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -9,7 +9,7 @@ use regex::Regex;
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{expected_result, TestScenario};
|
||||||
|
|
||||||
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";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) araba merci
|
// spell-checker:ignore (words) araba merci
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_default() {
|
fn test_default() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) bamf chdir rlimit prlimit COMSPEC
|
// spell-checker:ignore (words) bamf chdir rlimit prlimit COMSPEC
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
// spell-checker:ignore (ToDO) taaaa tbbbb tcccc
|
// spell-checker:ignore (ToDO) taaaa tbbbb tcccc
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore αbcdef ; (people) kkos
|
// spell-checker:ignore αbcdef ; (people) kkos
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_simple_values() {
|
fn test_simple_values() {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
// spell-checker:ignore (methods) hexdigest
|
// spell-checker:ignore (methods) hexdigest
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{AtPath, TestScenario};
|
||||||
|
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))]
|
||||||
use std::fs::OpenOptions;
|
use std::fs::OpenOptions;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
//spell-checker: ignore coreutil
|
//spell-checker: ignore coreutil
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{check_coreutil_version, expected_result, whoami, TestScenario};
|
||||||
|
|
||||||
const VERSION_MIN_MULTIPLE_USERS: &str = "8.31"; // this feature was introduced in GNU's coreutils 8.31
|
const VERSION_MIN_MULTIPLE_USERS: &str = "8.31"; // this feature was introduced in GNU's coreutils 8.31
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
// spell-checker:ignore checkfile, nonames, testf, ntestf
|
// spell-checker:ignore checkfile, nonames, testf, ntestf
|
||||||
macro_rules! get_hash(
|
macro_rules! get_hash(
|
||||||
($str:expr) => (
|
($str:expr) => (
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// spell-checker:ignore (words) bogusfile emptyfile abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstu
|
// spell-checker:ignore (words) bogusfile emptyfile abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstu
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
static INPUT: &str = "lorem_ipsum.txt";
|
static INPUT: &str = "lorem_ipsum.txt";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_hostname() {
|
fn test_hostname() {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// spell-checker:ignore (ToDO) coreutil
|
// spell-checker:ignore (ToDO) coreutil
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{check_coreutil_version, expected_result, is_ci, whoami, TestScenario};
|
||||||
|
|
||||||
const VERSION_MIN_MULTIPLE_USERS: &str = "8.31"; // this feature was introduced in GNU's coreutils 8.31
|
const VERSION_MIN_MULTIPLE_USERS: &str = "8.31"; // this feature was introduced in GNU's coreutils 8.31
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// spell-checker:ignore (words) helloworld nodir objdump n'source
|
// spell-checker:ignore (words) helloworld nodir objdump n'source
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{is_ci, TestScenario};
|
||||||
use filetime::FileTime;
|
use filetime::FileTime;
|
||||||
use rust_users::*;
|
use rust_users::{get_effective_gid, get_effective_uid};
|
||||||
use std::os::unix::fs::PermissionsExt;
|
use std::os::unix::fs::PermissionsExt;
|
||||||
#[cfg(not(any(windows, target_os = "freebsd")))]
|
#[cfg(not(any(windows, target_os = "freebsd")))]
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) autoformat nocheck
|
// spell-checker:ignore (words) autoformat nocheck
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))]
|
||||||
use std::fs::OpenOptions;
|
use std::fs::OpenOptions;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::os::unix::process::ExitStatusExt;
|
use std::os::unix::process::ExitStatusExt;
|
||||||
use std::process::{Child, Command};
|
use std::process::{Child, Command};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::{is_ci, TestScenario};
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -7,7 +7,7 @@ extern crate regex;
|
||||||
extern crate tempfile;
|
extern crate tempfile;
|
||||||
|
|
||||||
use self::regex::Regex;
|
use self::regex::Regex;
|
||||||
use crate::common::util::*;
|
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 std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
use std::os::unix::fs::PermissionsExt;
|
use std::os::unix::fs::PermissionsExt;
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (words) gpghome
|
// spell-checker:ignore (words) gpghome
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use is_terminal::IsTerminal;
|
use is_terminal::IsTerminal;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
extern crate filetime;
|
extern crate filetime;
|
||||||
extern crate time;
|
extern crate time;
|
||||||
|
|
||||||
use self::filetime::*;
|
use self::filetime::FileTime;
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(target_os = "android"))]
|
#[cfg(not(target_os = "android"))]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
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
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// spell-checker:ignore incorrectnumber
|
// spell-checker:ignore incorrectnumber
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore (paths) gnutest
|
// spell-checker:ignore (paths) gnutest
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
extern crate unindent;
|
extern crate unindent;
|
||||||
|
|
||||||
use self::unindent::*;
|
use self::unindent::unindent;
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::remove_file;
|
use std::fs::remove_file;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
struct TestData<'b> {
|
struct TestData<'b> {
|
||||||
name: &'b str,
|
name: &'b str,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{expected_result, TestScenario};
|
||||||
|
|
||||||
use self::uucore::entries::{Locate, Passwd};
|
use self::uucore::entries::{Locate, Passwd};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// spell-checker:ignore (ToDO) Sdivide
|
// spell-checker:ignore (ToDO) Sdivide
|
||||||
extern crate time;
|
extern crate time;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{TestScenario, UCommand};
|
||||||
use std::fs::metadata;
|
use std::fs::metadata;
|
||||||
use time::macros::format_description;
|
use time::macros::format_description;
|
||||||
use time::Duration;
|
use time::Duration;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn basic_literal() {
|
fn basic_literal() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{TestScenario, UCommand};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// spell-checker:ignore regfile
|
// spell-checker:ignore regfile
|
||||||
use crate::common::util::*;
|
use crate::common::util::{get_root_path, TestScenario};
|
||||||
|
|
||||||
static GIBBERISH: &str = "supercalifragilisticexpialidocious";
|
static GIBBERISH: &str = "supercalifragilisticexpialidocious";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::{get_root_path, TestScenario};
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
const DIR: &str = "dir";
|
const DIR: &str = "dir";
|
||||||
const DIR_FILE: &str = "dir/file";
|
const DIR_FILE: &str = "dir/file";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// spell-checker:ignore lmnop xlmnop
|
// spell-checker:ignore lmnop xlmnop
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use rstest::rstest;
|
use rstest::rstest;
|
||||||
|
|
||||||
// spell-checker:ignore dont
|
// spell-checker:ignore dont
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
fn test_helper(file_name: &str, possible_args: &[&str]) {
|
fn test_helper(file_name: &str, possible_args: &[&str]) {
|
||||||
for args in possible_args {
|
for args in possible_args {
|
||||||
|
|
|
@ -8,7 +8,7 @@ extern crate regex;
|
||||||
|
|
||||||
use self::rand::{thread_rng, Rng};
|
use self::rand::{thread_rng, Rng};
|
||||||
use self::regex::Regex;
|
use self::regex::Regex;
|
||||||
use crate::common::util::*;
|
use crate::common::util::{AtPath, TestScenario};
|
||||||
use rand::SeedableRng;
|
use rand::SeedableRng;
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{expected_result, TestScenario};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// spell-checker:ignore parenb parmrk ixany iuclc onlcr ofdel icanon noflsh
|
// spell-checker:ignore parenb parmrk ixany iuclc onlcr ofdel icanon noflsh
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
extern crate tempfile;
|
extern crate tempfile;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// spell-checker:ignore axxbxx bxxaxx axxx axxxx xxaxx xxax xxxxa axyz zyax zyxa
|
// spell-checker:ignore axxbxx bxxaxx axxx axxxx xxaxx xxax xxxxa axyz zyax zyxa
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
extern crate tail;
|
extern crate tail;
|
||||||
|
|
||||||
use crate::common::random::*;
|
use crate::common::random::{AlphanumericNewline, RandomString};
|
||||||
use crate::common::util::*;
|
use crate::common::util::{expected_result, is_ci, TestScenario};
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
use rand::distributions::Alphanumeric;
|
use rand::distributions::Alphanumeric;
|
||||||
use rstest::rstest;
|
use rstest::rstest;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
// tests for basic tee functionality.
|
// tests for basic tee functionality.
|
||||||
// inspired by:
|
// inspired by:
|
||||||
|
@ -108,7 +108,7 @@ fn test_tee_no_more_writeable_2() {
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
mod linux_only {
|
mod linux_only {
|
||||||
use crate::common::util::*;
|
use crate::common::util::{AtPath, TestScenario, UCommand};
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::process::{Output, Stdio};
|
use std::process::{Output, Stdio};
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// spell-checker:ignore (words) egid euid pseudofloat
|
// spell-checker:ignore (words) egid euid pseudofloat
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// spell-checker:ignore dont
|
// spell-checker:ignore dont
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -12,7 +12,7 @@ use self::touch::filetime::{self, FileTime};
|
||||||
extern crate time;
|
extern crate time;
|
||||||
use time::macros::{datetime, format_description};
|
use time::macros::{datetime, format_description};
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{AtPath, TestScenario};
|
||||||
use std::fs::remove_file;
|
use std::fs::remove_file;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// spell-checker:ignore aabbaa aabbcc aabc abbb abcc abcdefabcdef abcdefghijk abcdefghijklmn abcdefghijklmnop ABCDEFGHIJKLMNOPQRS abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFZZ abcxyz ABCXYZ abcxyzabcxyz ABCXYZABCXYZ acbdef alnum amzamz AMZXAMZ bbbd cclass cefgm cntrl compl dabcdef dncase Gzabcdefg PQRST upcase wxyzz xdigit xycde xyyye xyyz xyzzzzxyzzzz ZABCDEF Zamz Cdefghijkl Cdefghijklmn
|
// spell-checker:ignore aabbaa aabbcc aabc abbb abcc abcdefabcdef abcdefghijk abcdefghijklmn abcdefghijklmnop ABCDEFGHIJKLMNOPQRS abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFZZ abcxyz ABCXYZ abcxyzabcxyz ABCXYZABCXYZ acbdef alnum amzamz AMZXAMZ bbbd cclass cefgm cntrl compl dabcdef dncase Gzabcdefg PQRST upcase wxyzz xdigit xycde xyyye xyyz xyzzzzxyzzzz ZABCDEF Zamz Cdefghijkl Cdefghijklmn
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))]
|
||||||
use std::fs::OpenOptions;
|
use std::fs::OpenOptions;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// spell-checker:ignore (words) RFILE
|
// spell-checker:ignore (words) RFILE
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
use std::io::{Seek, SeekFrom, Write};
|
use std::io::{Seek, SeekFrom, Write};
|
||||||
|
|
||||||
static FILE1: &str = "truncate_test_1";
|
static FILE1: &str = "truncate_test_1";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
// spell-checker:ignore nabcd
|
// spell-checker:ignore nabcd
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
static INPUT: &str = "sorted.txt";
|
static INPUT: &str = "sorted.txt";
|
||||||
static OUTPUT: &str = "sorted-output.txt";
|
static OUTPUT: &str = "sorted-output.txt";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
use self::regex::Regex;
|
use self::regex::Regex;
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ extern crate regex;
|
||||||
extern crate tempfile;
|
extern crate tempfile;
|
||||||
|
|
||||||
use self::regex::Regex;
|
use self::regex::Regex;
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* As vdir use the same functions than ls, we don't have to retest them here.
|
* As vdir use the same functions than ls, we don't have to retest them here.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::common::util::*;
|
use crate::common::util::{vec_of_size, TestScenario};
|
||||||
|
|
||||||
// spell-checker:ignore (flags) lwmcL clmwL ; (path) bogusfile emptyfile manyemptylines moby notrailingnewline onelongemptyline onelongword weirdchars
|
// spell-checker:ignore (flags) lwmcL clmwL ; (path) bogusfile emptyfile manyemptylines moby notrailingnewline onelongemptyline onelongword weirdchars
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// spell-checker:ignore (flags) runlevel mesg
|
// spell-checker:ignore (flags) runlevel mesg
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{expected_result, TestScenario};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// * 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.
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::{expected_result, is_ci, whoami, TestScenario};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
|
|
|
@ -3,7 +3,7 @@ use std::process::{ExitStatus, Stdio};
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::os::unix::process::ExitStatusExt;
|
use std::os::unix::process::ExitStatusExt;
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
fn check_termination(result: &ExitStatus) {
|
fn check_termination(result: &ExitStatus) {
|
||||||
|
|
Loading…
Reference in a new issue