support C

This commit is contained in:
Venelin
2024-05-27 15:35:24 +03:00
parent cf3663b348
commit 861a0bd1e4
5 changed files with 78 additions and 26 deletions
+7 -5
View File
@@ -3,11 +3,13 @@
int main()
{
int* x;
void* y;
x = y;
void* y = 0;
x = y; /* should only work on C */
if(x == 0)
{
printf("C compilation OK!\n");
}
char s[16];
scanf("%s", s);
printf("%s\n", s);
return 0;
}
@@ -1,3 +1,5 @@
// Test cppipe functions
#include <cppipe/commands.hpp>
#include <sys/wait.h>
@@ -26,7 +28,10 @@ int main(int argc, char* argv[])
string out2 = $(echo + "abc" + "def");
if(auto len = out2.size(); len != 8)
{
cerr << "FAILURE: unexpected output length " << len << endl;
exit(1);
}
Cmd success("echo", "OK 1/11");
Cmd fail("mkdir", ".");