mirror of
https://github.com/uutils/coreutils
synced 2024-09-06 07:54:05 +00:00
Add initial tests for false/true.
This commit is contained in:
parent
87e7cc9b44
commit
9172bb9bd8
2
Makefile
2
Makefile
|
@ -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
|
||||
|
||||
|
|
9
test/false.rs
Normal file
9
test/false.rs
Normal file
|
@ -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);
|
||||
}
|
9
test/true.rs
Normal file
9
test/true.rs
Normal file
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue