1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 04:27:45 +00:00

Merge pull request #3777 from jhscheer/fix_3733

tests: fix Freebsd test failures
This commit is contained in:
Sylvestre Ledru 2022-08-05 09:26:20 +02:00 committed by GitHub
commit 774c3f8f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View file

@ -20,11 +20,6 @@ use std::thread::sleep;
#[cfg(unix)]
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_2_TXT: &str = "foobar2.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
// of the watched file was removed and recreated.
use tail::text::BACKEND;
let ts = TestScenario::new(util_name!());
let at = &ts.fixtures;
let watched_file = std::path::Path::new("watched_file");

View file

@ -1,6 +1,3 @@
#[cfg(all(unix, not(target_os = "macos")))]
use pretty_assertions::assert_ne;
use crate::common::util::*;
// 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]
#[cfg(any(target_os = "linux", target_os = "android"))]
fn test_files_from_pseudo_filesystem() {
use pretty_assertions::assert_ne;
let result = new_ucmd!().arg("-c").arg("/proc/cpuinfo").succeeds();
assert_ne!(result.stdout_str(), "0 /proc/cpuinfo\n");
}