2020-05-25 17:05:26 +00:00
|
|
|
use crate::common::util::*;
|
2020-05-11 08:44:12 +00:00
|
|
|
|
|
|
|
#[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();
|
2020-05-11 08:44:12 +00:00
|
|
|
}
|
2021-04-02 20:34:02 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_more_dir_arg() {
|
2021-04-22 20:37:44 +00:00
|
|
|
let result = new_ucmd!().arg(".").run();
|
|
|
|
result.failure();
|
2021-04-02 20:34:02 +00:00
|
|
|
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);
|
2021-04-02 20:34:02 +00:00
|
|
|
}
|