mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
wc: fix counting files from pseudo-filesystem
This commit is contained in:
parent
9dbff22101
commit
dd311b294b
3 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
|||
#[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
|
||||
|
@ -235,3 +238,10 @@ fn test_read_from_nonexistent_file() {
|
|||
.stderr_contains(MSG)
|
||||
.stdout_is("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
fn test_files_from_pseudo_filesystem() {
|
||||
let result = new_ucmd!().arg("-c").arg("/proc/version").succeeds();
|
||||
assert_ne!(result.stdout_str(), "0 /proc/version\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue