Make improvements

This commit is contained in:
Justine Tunney 2020-12-01 03:43:40 -08:00
parent 3e4fd4b0ad
commit e44a0cf6f8
256 changed files with 23100 additions and 2294 deletions

View file

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