mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Make improvements
This commit is contained in:
parent
3e4fd4b0ad
commit
e44a0cf6f8
256 changed files with 23100 additions and 2294 deletions
|
@ -17,9 +17,17 @@
|
|||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
||||
TEST(system, nullParam_testsIfSystemHasShell) { ASSERT_EQ(true, system(NULL)); }
|
||||
TEST(system, test) { ASSERT_EQ(42, WEXITSTATUS(system("exit 42"))); }
|
||||
TEST(system, nullParam_testsIfSystemHasShell) {
|
||||
ASSERT_EQ(true, system(NULL));
|
||||
}
|
||||
|
||||
TEST(system, test) {
|
||||
int rc;
|
||||
rc = system("exit 42");
|
||||
ASSERT_NE(-1, rc);
|
||||
ASSERT_EQ(42, WEXITSTATUS(rc));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue