mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Add initial tests for false/true.
This commit is contained in:
@@ -164,6 +164,7 @@ TEST_PROGS := \
|
||||
dirname \
|
||||
echo \
|
||||
factor \
|
||||
false \
|
||||
fold \
|
||||
mkdir \
|
||||
mv \
|
||||
@@ -173,6 +174,7 @@ TEST_PROGS := \
|
||||
sort \
|
||||
test \
|
||||
tr \
|
||||
true \
|
||||
truncate \
|
||||
unexpand
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
use std::process::Command;
|
||||
|
||||
static PROGNAME: &'static str = "./false";
|
||||
|
||||
#[test]
|
||||
fn test_exit_code() {
|
||||
let exit_status = Command::new(PROGNAME).status().unwrap().success();
|
||||
assert_eq!(exit_status, false);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
use std::process::Command;
|
||||
|
||||
static PROGNAME: &'static str = "./true";
|
||||
|
||||
#[test]
|
||||
fn test_exit_code() {
|
||||
let exit_status = Command::new(PROGNAME).status().unwrap().success();
|
||||
assert_eq!(exit_status, true);
|
||||
}
|
||||
Reference in New Issue
Block a user