summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-06-30 01:36:17 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-06-30 01:36:17 +0300
commit5e2278d6d4e2337c05b2f4e583dc8620b90e9add (patch)
tree548f452710fa03a390caecd3212eaf8bf4ccbea5 /test cases
parent7fe106365c54d119c292b0e5d2c1524246c590ac (diff)
downloadmeson-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.build19
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