mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 17:58:06 +00:00
19 lines
497 B
Rust
19 lines
497 B
Rust
use crate::common::util::*;
|
|
|
|
#[test]
|
|
fn test_more_no_arg() {
|
|
let (_, mut ucmd) = at_and_ucmd!();
|
|
let result = ucmd.run();
|
|
assert!(!result.success);
|
|
}
|
|
|
|
#[test]
|
|
fn test_more_dir_arg() {
|
|
let (_, mut ucmd) = at_and_ucmd!();
|
|
ucmd.arg(".");
|
|
let result = ucmd.run();
|
|
assert!(!result.success);
|
|
const EXPECTED_ERROR_MESSAGE: &str =
|
|
"more: '.' is a directory.\nTry 'more --help' for more information.";
|
|
assert_eq!(result.stderr.trim(), EXPECTED_ERROR_MESSAGE);
|
|
}
|