mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests: fix Freebsd test failures
This commit is contained in:
parent
fa47af73d0
commit
0555745052
2 changed files with 3 additions and 8 deletions
|
@ -20,11 +20,6 @@ use std::thread::sleep;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
pub static BACKEND: &str = "inotify";
|
|
||||||
// #[cfg(all(unix, not(target_os = "linux")))]
|
|
||||||
// pub static BACKEND: &str = "kqueue";
|
|
||||||
|
|
||||||
static FOOBAR_TXT: &str = "foobar.txt";
|
static FOOBAR_TXT: &str = "foobar.txt";
|
||||||
static FOOBAR_2_TXT: &str = "foobar2.txt";
|
static FOOBAR_2_TXT: &str = "foobar2.txt";
|
||||||
static FOOBAR_WITH_NULL_TXT: &str = "foobar_with_null.txt";
|
static FOOBAR_WITH_NULL_TXT: &str = "foobar_with_null.txt";
|
||||||
|
@ -1446,6 +1441,8 @@ fn test_retry9() {
|
||||||
// Ensure that inotify will switch to polling mode if directory
|
// Ensure that inotify will switch to polling mode if directory
|
||||||
// of the watched file was removed and recreated.
|
// of the watched file was removed and recreated.
|
||||||
|
|
||||||
|
use tail::text::BACKEND;
|
||||||
|
|
||||||
let ts = TestScenario::new(util_name!());
|
let ts = TestScenario::new(util_name!());
|
||||||
let at = &ts.fixtures;
|
let at = &ts.fixtures;
|
||||||
let watched_file = std::path::Path::new("watched_file");
|
let watched_file = std::path::Path::new("watched_file");
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#[cfg(all(unix, not(target_os = "macos")))]
|
|
||||||
use pretty_assertions::assert_ne;
|
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::*;
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -404,6 +401,7 @@ fn test_read_from_nonexistent_file() {
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
fn test_files_from_pseudo_filesystem() {
|
fn test_files_from_pseudo_filesystem() {
|
||||||
|
use pretty_assertions::assert_ne;
|
||||||
let result = new_ucmd!().arg("-c").arg("/proc/cpuinfo").succeeds();
|
let result = new_ucmd!().arg("-c").arg("/proc/cpuinfo").succeeds();
|
||||||
assert_ne!(result.stdout_str(), "0 /proc/cpuinfo\n");
|
assert_ne!(result.stdout_str(), "0 /proc/cpuinfo\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue