2023-08-21 08:49:27 +00:00
|
|
|
// This file is part of the uutils coreutils package.
|
|
|
|
//
|
|
|
|
// For the full copyright and license information, please view the LICENSE
|
|
|
|
// file that was distributed with this source code.
|
2023-04-10 06:31:31 +00:00
|
|
|
use crate::common::util::TestScenario;
|
|
|
|
use regex::Regex;
|
2020-06-08 07:09:44 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_normal() {
|
|
|
|
let re = Regex::new(r"^[0-9a-f]{8}").unwrap();
|
2021-04-17 23:28:06 +00:00
|
|
|
new_ucmd!().succeeds().stdout_matches(&re);
|
2020-06-08 07:09:44 +00:00
|
|
|
}
|
2024-03-31 19:08:01 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_invalid_flag() {
|
|
|
|
new_ucmd!()
|
|
|
|
.arg("--invalid-argument")
|
|
|
|
.fails()
|
|
|
|
.no_stdout()
|
|
|
|
.code_is(1);
|
|
|
|
}
|