aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-07-01 18:12:30 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-07-01 18:12:30 +0300
commitc0c2c35496f2832fee7623ec268e87e23b58a33f (patch)
tree0a6b20c2671b71fe9febfcf0c19cfe22ec980a70 /test cases
parente5443493bf348993378e1dc59cafde315f851d9b (diff)
downloadmeson-c0c2c35496f2832fee7623ec268e87e23b58a33f.zip
meson-c0c2c35496f2832fee7623ec268e87e23b58a33f.tar.gz
meson-c0c2c35496f2832fee7623ec268e87e23b58a33f.tar.bz2
Windows command execution works.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/38 run program/meson.build14
-rw-r--r--test cases/common/38 run program/scripts/hello.bat2
2 files changed, 13 insertions, 3 deletions
diff --git a/test cases/common/38 run program/meson.build b/test cases/common/38 run program/meson.build
index e035643..5fe03d3 100644
--- a/test cases/common/38 run program/meson.build
+++ b/test cases/common/38 run program/meson.build
@@ -1,6 +1,11 @@
project('run command', 'c')
-c = run_command('echo', 'hello')
+if host.name() == 'windows'
+ c = run_command('cmd', '/c', 'echo', 'hello')
+else
+ c = run_command('echo', 'hello')
+endif
+
correct = 'hello'
if c.returncode() != 0
@@ -19,8 +24,11 @@ endif
# Now the same with a script.
-cs = run_command('scripts/hello.sh')
-correct = 'hello'
+if host.name() == 'windows'
+ cs = run_command('scripts/hello.bat')
+else
+ cs = run_command('scripts/hello.sh')
+endif
if cs.returncode() != 0
error('Executing script failed.')
diff --git a/test cases/common/38 run program/scripts/hello.bat b/test cases/common/38 run program/scripts/hello.bat
new file mode 100644
index 0000000..cbc346b
--- /dev/null
+++ b/test cases/common/38 run program/scripts/hello.bat
@@ -0,0 +1,2 @@
+@ECHO OFF
+ECHO hello