Skip to content

Commit ac19fe3

Browse files
committed
test:compile: Add more tests.
1 parent b53f991 commit ac19fe3

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// RUN: vast-front -o %t %s && (%t 1 2 3; test $? -eq 5)
2+
3+
int x = 5;
4+
5+
int main(int argc, char **argv)
6+
{
7+
return x;
8+
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: vast-front -o %t %s && %t | FileCheck %s
2+
3+
int putchar(int);
4+
5+
int main()
6+
{
7+
// CHECK: a
8+
putchar('a');
9+
putchar('\n');
10+
// Workaround as `vast-front` and `vast-cc` behave differently.
11+
return 0;
12+
}
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: vast-front -o %t %s && %t hello | FileCheck %s
2+
3+
int puts(const char *);
4+
5+
int main(int argc, char **argv)
6+
{
7+
if (argc < 1)
8+
{
9+
puts("Nothing");
10+
return 0;
11+
}
12+
13+
// CHECK: hello
14+
puts(argv[1]);
15+
// Workaround as `vast-front` and `vast-cc` behave differently.
16+
return 0;
17+
}

0 commit comments

Comments
 (0)