From c0c2c35496f2832fee7623ec268e87e23b58a33f Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen <jpakkane@gmail.com> Date: Mon, 1 Jul 2013 18:12:30 +0300 Subject: Windows command execution works. --- test cases/common/38 run program/meson.build | 14 +++++++++++--- test cases/common/38 run program/scripts/hello.bat | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 test cases/common/38 run program/scripts/hello.bat (limited to 'test cases') 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 -- cgit v1.1