summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-04-07 17:40:33 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-10 12:32:32 (GMT)
commit6c4781baa9ea4cfb7b4de9ef91e58888286fab44 (patch)
tree992b9334ad833f69543702c50d1166ff1b2c06e4 /Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
parentfd04d87323749c15969982d9aa9b72059f33463b (diff)
downloadCMake-6c4781baa9ea4cfb7b4de9ef91e58888286fab44.zip
CMake-6c4781baa9ea4cfb7b4de9ef91e58888286fab44.tar.gz
CMake-6c4781baa9ea4cfb7b4de9ef91e58888286fab44.tar.bz2
Tests: Consolidate, refactor and extend -E tar tests
Diffstat (limited to 'Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake b/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
new file mode 100644
index 0000000..12635db
--- /dev/null
+++ b/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
@@ -0,0 +1,28 @@
+include(RunCMake)
+
+function(external_command_test NAME)
+ run_cmake_command(${NAME} ${CMAKE_COMMAND} -E ${ARGN})
+endfunction()
+
+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)
+external_command_test(bad-from2 tar cvf bad.tar --files-from=.)
+external_command_test(bad-from3 tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/bad-from3.txt)
+external_command_test(bad-from4 tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/bad-from4.txt)
+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")
+
+run_cmake(7zip)
+run_cmake(gnutar)
+run_cmake(gnutar-gz)
+run_cmake(pax)
+run_cmake(pax-xz)
+run_cmake(paxr)
+run_cmake(paxr-bz2)
+run_cmake(zip)