diff options
author | Brad King <brad.king@kitware.com> | 2014-01-21 18:48:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-01-21 18:50:49 (GMT) |
commit | 94389f6388367aa4d9bfa58c9cde89e33d1858dc (patch) | |
tree | fb39dc1d65ae8332ab8dc791de86dc01eb91fc8b /Tests | |
parent | a86865e96c55c8a35615c24af0cf1c990f4bba68 (diff) | |
download | CMake-94389f6388367aa4d9bfa58c9cde89e33d1858dc.zip CMake-94389f6388367aa4d9bfa58c9cde89e33d1858dc.tar.gz CMake-94389f6388367aa4d9bfa58c9cde89e33d1858dc.tar.bz2 |
cmake: Add '-E sleep' command
Add a cmake command-line interface to provide a cross-platform 'sleep'.
Diffstat (limited to 'Tests')
7 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-result.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-stderr.txt new file mode 100644 index 0000000..45e6ebc --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-stderr.txt @@ -0,0 +1 @@ +^Unknown sleep time format "x"\.$ diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-result.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-stderr.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-stderr.txt new file mode 100644 index 0000000..399d47f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-stderr.txt @@ -0,0 +1 @@ +^Unknown sleep time format "-1"\.$ diff --git a/Tests/RunCMake/CommandLine/E_sleep-no-args-result.txt b/Tests/RunCMake/CommandLine/E_sleep-no-args-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-no-args-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sleep-no-args-stderr.cmake b/Tests/RunCMake/CommandLine/E_sleep-no-args-stderr.cmake new file mode 100644 index 0000000..977f1ef --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-no-args-stderr.cmake @@ -0,0 +1,2 @@ +Usage: .*/cmake -E \[command\] \[arguments \.\.\.\] +Available commands: diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index ee6cd99..ada4cab 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -23,3 +23,8 @@ if(UNIX) ${CMAKE_COMMAND} -E create_symlink T . ) endif() + +run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) +run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) +run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) +run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) |