diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-06-30 01:36:17 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-06-30 01:36:17 +0300 |
| commit | 5e2278d6d4e2337c05b2f4e583dc8620b90e9add (patch) | |
| tree | 548f452710fa03a390caecd3212eaf8bf4ccbea5 /test cases | |
| parent | 7fe106365c54d119c292b0e5d2c1524246c590ac (diff) | |
| download | meson-5e2278d6d4e2337c05b2f4e583dc8620b90e9add.tar.gz | |
Can run external programs and capture their output. Also some string function work.
Diffstat (limited to 'test cases')
| -rw-r--r-- | test cases/common/38 run program/meson.build | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test cases/common/38 run program/meson.build b/test cases/common/38 run program/meson.build new file mode 100644 index 000000000..559f5cda2 --- /dev/null +++ b/test cases/common/38 run program/meson.build @@ -0,0 +1,19 @@ +project('run command', 'c') + +c = run_command('echo', 'hello') +correct = 'hello' + +if c.returncode() != 0 + error('Executing echo failed.') +endif + +result = c.stdout() +result = result.strip() + +if result != correct + error('Getting stdout failed.') +endif + +if c.stderr() != '' + error('Extra text in stderr.') +endif |
