update test_templates

pull/6756/head
Michael 5 years ago committed by Jussi Pakkanen
parent 99202c9ccd
commit a16db4e918
  1. 5
      run_unittests.py

@ -3332,6 +3332,11 @@ int main(int argc, char **argv) {
with open(os.path.join(tmpdir, 'foo.' + lang), 'w') as f: with open(os.path.join(tmpdir, 'foo.' + lang), 'w') as f:
f.write('int main(void) {}') f.write('int main(void) {}')
self._run(self.meson_command + ['init', '-b'], workdir=tmpdir) self._run(self.meson_command + ['init', '-b'], workdir=tmpdir)
elif lang in ('java'):
with tempfile.TemporaryDirectory() as tmpdir:
with open(os.path.join(tmpdir, 'Foo.' + lang), 'w') as f:
f.write('public class Foo { public static void main() {} }')
self._run(self.meson_command + ['init', '-b'], workdir=tmpdir)
# The test uses mocking and thus requires that # The test uses mocking and thus requires that
# the current process is the one to run the Meson steps. # the current process is the one to run the Meson steps.

Loading…
Cancel
Save