diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-07 17:22:18 +0530 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-18 02:38:54 +0530 |
| commit | 18bce476913de4deec18fcd028cb59d378c43812 (patch) | |
| tree | e0c561119bc89ea4b98ffc6641a5028aa20556fc /test cases/windows | |
| parent | d5b494492481a4379174786237cbc4d7eb037373 (diff) | |
| download | meson-18bce476913de4deec18fcd028cb59d378c43812.tar.gz | |
find_program: Correctly use scripts found in PATH
We also need to check whether the program found in PATH can be executed
directly by Windows or if we need to figure out what the interpreter is
and add it to the list.
Also add `msc` to the list of extensions that can be executed natively
Includes a project test and a unit test for this and all expected
behaviours on Windows.
Diffstat (limited to 'test cases/windows')
| -rw-r--r-- | test cases/windows/9 find program/meson.build | 8 | ||||
| -rw-r--r-- | test cases/windows/9 find program/test-script-ext.py | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test cases/windows/9 find program/meson.build b/test cases/windows/9 find program/meson.build index ef3458685..565fb626d 100644 --- a/test cases/windows/9 find program/meson.build +++ b/test cases/windows/9 find program/meson.build @@ -1,4 +1,12 @@ project('find program', 'c') +# Test that we can find native windows executables +find_program('cmd') +find_program('cmd.exe') + +# Test that a script file with an extension can be found +ext = find_program('test-script-ext.py') +test('ext', ext) +# Test that a script file without an extension can be found prog = find_program('test-script') test('script', prog) diff --git a/test cases/windows/9 find program/test-script-ext.py b/test cases/windows/9 find program/test-script-ext.py new file mode 100644 index 000000000..ae9adfb8e --- /dev/null +++ b/test cases/windows/9 find program/test-script-ext.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('ext/noext') |
