mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Migrate from atty
to is-terminal
(#4382)
This commit is contained in:
parent
4e7ae2d46a
commit
7d7b9eb49a
18 changed files with 161 additions and 70 deletions
|
@ -1,9 +1,10 @@
|
|||
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 atty::is(atty::Stream::Stdout) {
|
||||
if std::io::stdout().is_terminal() {
|
||||
new_ucmd!().succeeds();
|
||||
} else {
|
||||
}
|
||||
|
@ -14,7 +15,7 @@ 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 atty::is(atty::Stream::Stdout) {
|
||||
if std::io::stdout().is_terminal() {
|
||||
new_ucmd!()
|
||||
.arg(".")
|
||||
.fails()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue