mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Add initial tests for false/true.
This commit is contained in:
parent
87e7cc9b44
commit
9172bb9bd8
3 changed files with 20 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue