mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
who freebsd build fix unsupported RUN_LVL option only for other platforms.
This commit is contained in:
parent
542deb8888
commit
fcb079e20e
2 changed files with 27 additions and 7 deletions
|
@ -83,7 +83,7 @@ fn test_process() {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_vendor = "apple", target_os = "linux"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_runlevel() {
|
||||
for opt in vec!["-r", "--runlevel"] {
|
||||
|
@ -94,6 +94,19 @@ fn test_runlevel() {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_vendor = "apple", target_os = "freebsd"))]
|
||||
#[test]
|
||||
fn test_runlevel() {
|
||||
let expected =
|
||||
"error: Found argument";
|
||||
for opt in vec!["-r", "--runlevel"] {
|
||||
new_ucmd!()
|
||||
.arg(opt)
|
||||
.fails()
|
||||
.stderr_contains(expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_vendor = "apple", target_os = "linux"))]
|
||||
#[test]
|
||||
fn test_time() {
|
||||
|
@ -122,6 +135,7 @@ fn test_mesg() {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_arg1_arg2() {
|
||||
let args = ["am", "i"];
|
||||
|
@ -132,6 +146,7 @@ fn test_arg1_arg2() {
|
|||
.stdout_is(expected_result(&args));
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_too_many_args() {
|
||||
const EXPECTED: &str =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue