mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 09:48:03 +00:00
22 lines
589 B
Rust
22 lines
589 B
Rust
use common::util::*;
|
|
|
|
static UTIL_NAME: &'static str = "pathchk";
|
|
|
|
#[test]
|
|
fn test_default_mode() {
|
|
// test the default mode
|
|
{
|
|
// accept some reasonable default
|
|
let (_, mut ucmd) = testing(UTIL_NAME);
|
|
let result = ucmd.args(&["abc/def"]).run();
|
|
assert_eq!(result.stdout, "");
|
|
assert!(result.success);
|
|
}
|
|
{
|
|
// fail on long inputs
|
|
let (_, mut ucmd) = testing(UTIL_NAME);
|
|
let result = ucmd.args(&[repeat_str("test", 20000)]).run();
|
|
assert_eq!(result.stdout, "");
|
|
assert!(!result.success);
|
|
}
|
|
}
|