This tests that generated C files make it past the filtering in generate_vale_compile().pull/908/head
parent
65e9761cb1
commit
3032c2b580
6 changed files with 25 additions and 4 deletions
@ -0,0 +1,5 @@ |
|||||||
|
int retval (void); |
||||||
|
|
||||||
|
int test (void) { |
||||||
|
return retval (); |
||||||
|
} |
@ -0,0 +1,5 @@ |
|||||||
|
writec = find_program('writec.py') |
||||||
|
|
||||||
|
retval = custom_target('writec', |
||||||
|
output : 'retval.c', |
||||||
|
command : [writec, '@OUTPUT@']) |
@ -0,0 +1,12 @@ |
|||||||
|
#!/usr/bin/env python3 |
||||||
|
|
||||||
|
import sys |
||||||
|
|
||||||
|
c = '''int |
||||||
|
retval(void) { |
||||||
|
return 0; |
||||||
|
} |
||||||
|
''' |
||||||
|
|
||||||
|
with open(sys.argv[1], 'w') as f: |
||||||
|
f.write(c) |
@ -1,3 +0,0 @@ |
|||||||
int test () { |
|
||||||
return 0; |
|
||||||
} |
|
Loading…
Reference in new issue