coreutils/tests/by-util/test_more.rs

17 lines
440 B
Rust
Raw Normal View History

use crate::common::util::*;
#[test]
fn test_more_no_arg() {
2021-04-22 20:37:44 +00:00
// stderr = more: Reading from stdin isn't supported yet.
new_ucmd!().fails();
}
#[test]
fn test_more_dir_arg() {
2021-04-22 20:37:44 +00:00
let result = new_ucmd!().arg(".").run();
result.failure();
const EXPECTED_ERROR_MESSAGE: &str =
"more: '.' is a directory.\nTry 'more --help' for more information.";
2021-04-22 20:37:44 +00:00
assert_eq!(result.stderr_str().trim(), EXPECTED_ERROR_MESSAGE);
}