mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Further improve cocmd interpreter
This commit is contained in:
parent
0cee831da3
commit
0f89140882
14 changed files with 278 additions and 181 deletions
|
@ -17,12 +17,14 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/paths.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
@ -105,3 +107,12 @@ TEST(system, notequals) {
|
|||
ASSERT_EQ(1, WEXITSTATUS(system("test a != a")));
|
||||
ASSERT_EQ(0, WEXITSTATUS(system("test a != b")));
|
||||
}
|
||||
|
||||
TEST(system, usleep) {
|
||||
ASSERT_EQ(0, WEXITSTATUS(system("usleep & kill $!")));
|
||||
}
|
||||
|
||||
TEST(system, kill) {
|
||||
int ws = system("kill -TERM $$; usleep");
|
||||
if (!IsWindows()) ASSERT_EQ(SIGTERM, WTERMSIG(ws));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue