update test_templates

This commit is contained in:
Michael 2020-03-02 08:38:22 -08:00 committed by Jussi Pakkanen
parent 99202c9ccd
commit a16db4e918
1 changed files with 5 additions and 0 deletions

View File

@ -3332,6 +3332,11 @@ int main(int argc, char **argv) {
with open(os.path.join(tmpdir, 'foo.' + lang), 'w') as f:
f.write('int main(void) {}')
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 current process is the one to run the Meson steps.