Add generated C file to mixed sources Vala test

This tests that generated C files make it past the filtering in
generate_vale_compile().
pull/908/head
Nirbheek Chauhan 8 years ago
parent 65e9761cb1
commit 3032c2b580
  1. 5
      test cases/vala/11 mixed sources/c/foo.c
  2. 5
      test cases/vala/11 mixed sources/c/meson.build
  3. 12
      test cases/vala/11 mixed sources/c/writec.py
  4. 3
      test cases/vala/11 mixed sources/foo.c
  5. 4
      test cases/vala/11 mixed sources/meson.build
  6. 0
      test cases/vala/11 mixed sources/vala/bar.vala

@ -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;
}

@ -2,4 +2,6 @@ project('foo', 'c', 'vala')
glib = dependency('glib-2.0')
executable('foo', 'foo.c', 'bar.vala', dependencies: [glib])
subdir('c')
e = executable('foo', 'c/foo.c', retval, 'vala/bar.vala', dependencies: [glib])
test('test foo', e)

Loading…
Cancel
Save