Add initial tests for false/true.

This commit is contained in:
Joseph Crail 2015-05-09 15:17:16 -04:00
parent 87e7cc9b44
commit 9172bb9bd8
3 changed files with 20 additions and 0 deletions

View file

@ -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
View 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
View 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);
}