aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-06-30 22:30:11 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-06-30 22:30:11 +0300
commite5443493bf348993378e1dc59cafde315f851d9b (patch)
tree69095f0f304054b37058aa1f9bec920259f9e365 /test cases
parenta52336b4294b72019587257d0848d42c0e2400fc (diff)
downloadmeson-e5443493bf348993378e1dc59cafde315f851d9b.zip
meson-e5443493bf348993378e1dc59cafde315f851d9b.tar.gz
meson-e5443493bf348993378e1dc59cafde315f851d9b.tar.bz2
Can run local script files as well as commands.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/38 run program/meson.build17
-rwxr-xr-xtest cases/common/38 run program/scripts/hello.sh3
2 files changed, 20 insertions, 0 deletions
diff --git a/test cases/common/38 run program/meson.build b/test cases/common/38 run program/meson.build
index 2c23985..e035643 100644
--- a/test cases/common/38 run program/meson.build
+++ b/test cases/common/38 run program/meson.build
@@ -16,3 +16,20 @@ endif
if c.stderr() != ''
error('Extra text in stderr.')
endif
+
+# Now the same with a script.
+
+cs = run_command('scripts/hello.sh')
+correct = 'hello'
+
+if cs.returncode() != 0
+ error('Executing script failed.')
+endif
+
+if cs.stdout().strip() != correct
+ error('Getting stdout failed (script).')
+endif
+
+if cs.stderr() != ''
+ error('Extra text in stderr (script).')
+endif
diff --git a/test cases/common/38 run program/scripts/hello.sh b/test cases/common/38 run program/scripts/hello.sh
new file mode 100755
index 0000000..2a22daa
--- /dev/null
+++ b/test cases/common/38 run program/scripts/hello.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo hello