summaryrefslogtreecommitdiffstats
path: root/test cases/native/9 override with exe/subprojects/sub/foobar.c
blob: c21d4502851dda9bc5b2d460cbcb6bfb1ff11fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <assert.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
  assert(argc == 2);
  FILE *f = fopen(argv[1], "w");
  const char msg[] = "int main(void) {return 0;}\n";
  size_t w = fwrite(msg, 1, sizeof(msg) - 1, f);
  assert(w == sizeof(msg) - 1);
  int r = fclose(f);
  assert(r == 0);
  return 0;
}