cosmopolitan/test/libc/release/smokecxx.cc

12 lines
202 B
C++
Raw Normal View History

int main() {
int rc;
FILE *f;
f = fopen("/dev/null", "w");
fprintf(f, "hello world\n");
fclose(f);
rc = system("exit 42");
CHECK_NE(-1, rc);
CHECK_EQ(42, WEXITSTATUS(rc));
return 0;
}