mirror of
https://github.com/uutils/coreutils
synced 2024-09-16 06:21:12 +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 \
|
dirname \
|
||||||
echo \
|
echo \
|
||||||
factor \
|
factor \
|
||||||
|
false \
|
||||||
fold \
|
fold \
|
||||||
mkdir \
|
mkdir \
|
||||||
mv \
|
mv \
|
||||||
|
@ -173,6 +174,7 @@ TEST_PROGS := \
|
||||||
sort \
|
sort \
|
||||||
test \
|
test \
|
||||||
tr \
|
tr \
|
||||||
|
true \
|
||||||
truncate \
|
truncate \
|
||||||
unexpand
|
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