mirror of
https://github.com/uutils/coreutils
synced 2024-12-15 07:42:48 +00:00
25 lines
644 B
Rust
25 lines
644 B
Rust
use crate::common::util::*;
|
|
use is_terminal::IsTerminal;
|
|
|
|
#[test]
|
|
fn test_more_no_arg() {
|
|
// Reading from stdin is now supported, so this must succeed
|
|
if std::io::stdout().is_terminal() {
|
|
new_ucmd!().succeeds();
|
|
} else {
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn test_more_dir_arg() {
|
|
// Run the test only if there's a valid terminal, else do nothing
|
|
// Maybe we could capture the error, i.e. "Device not found" in that case
|
|
// but I am leaving this for later
|
|
if std::io::stdout().is_terminal() {
|
|
new_ucmd!()
|
|
.arg(".")
|
|
.fails()
|
|
.usage_error("'.' is a directory.");
|
|
} else {
|
|
}
|
|
}
|