diff options
author | Bartosz Kosiorek <bartosz.kosiorek@tomtom.com> | 2019-03-08 16:04:17 (GMT) |
---|---|---|
committer | Bartosz Kosiorek <bartosz.kosiorek@tomtom.com> | 2019-03-18 16:08:20 (GMT) |
commit | 7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798 (patch) | |
tree | 6fab40bcdd5f6e925700434257fcf90402cc2a89 /Tests | |
parent | b06f8c93e5bc65394fe55b3f7ae923fe296048b3 (diff) | |
download | CMake-7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798.zip CMake-7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798.tar.gz CMake-7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798.tar.bz2 |
cmake: tar: Display warning when no files provided during archive creation
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLineTar/end-opt2-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLineTar/without-files-stderr.txt | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake b/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake index 12635db..24bb9a9 100644 --- a/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake @@ -4,6 +4,7 @@ function(external_command_test NAME) run_cmake_command(${NAME} ${CMAKE_COMMAND} -E ${ARGN}) endfunction() +external_command_test(without-files tar cvf bad.tar) external_command_test(bad-opt1 tar cvf bad.tar --bad) external_command_test(bad-mtime1 tar cvf bad.tar --mtime=bad .) external_command_test(bad-from1 tar cvf bad.tar --files-from=bad) @@ -13,10 +14,10 @@ external_command_test(bad-from4 tar cvf bad.tar --files-from=${CMAKE_CURRENT_LI external_command_test(bad-from5 tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/bad-from5.txt) external_command_test(end-opt1 tar cvf bad.tar -- --bad) external_command_test(end-opt2 tar cvf bad.tar --) -external_command_test(mtime tar cvf bad.tar "--mtime=1970-01-01 00:00:00 UTC") -external_command_test(bad-format tar cvf bad.tar "--format=bad-format") -external_command_test(zip-bz2 tar cvjf bad.tar "--format=zip") -external_command_test(7zip-gz tar cvzf bad.tar "--format=7zip") +external_command_test(mtime tar cvf bad.tar "--mtime=1970-01-01 00:00:00 UTC" .) +external_command_test(bad-format tar cvf bad.tar "--format=bad-format" .) +external_command_test(zip-bz2 tar cvjf bad.tar "--format=zip" .) +external_command_test(7zip-gz tar cvzf bad.tar "--format=7zip" .) run_cmake(7zip) run_cmake(gnutar) diff --git a/Tests/RunCMake/CommandLineTar/end-opt2-stderr.txt b/Tests/RunCMake/CommandLineTar/end-opt2-stderr.txt new file mode 100644 index 0000000..70166f5 --- /dev/null +++ b/Tests/RunCMake/CommandLineTar/end-opt2-stderr.txt @@ -0,0 +1 @@ +^tar: No files or directories specified diff --git a/Tests/RunCMake/CommandLineTar/without-files-stderr.txt b/Tests/RunCMake/CommandLineTar/without-files-stderr.txt new file mode 100644 index 0000000..70166f5 --- /dev/null +++ b/Tests/RunCMake/CommandLineTar/without-files-stderr.txt @@ -0,0 +1 @@ +^tar: No files or directories specified |