summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLineTar/touch-mtime.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CommandLineTar/touch-mtime.cmake')
-rw-r--r--Tests/RunCMake/CommandLineTar/touch-mtime.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLineTar/touch-mtime.cmake b/Tests/RunCMake/CommandLineTar/touch-mtime.cmake
new file mode 100644
index 0000000..c9e3524
--- /dev/null
+++ b/Tests/RunCMake/CommandLineTar/touch-mtime.cmake
@@ -0,0 +1,13 @@
+include(${CMAKE_CURRENT_LIST_DIR}/mtime-tests.cmake)
+
+set(DECOMPRESSION_OPTIONS --touch)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+foreach(file ${CHECK_FILES})
+ file(TIMESTAMP ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file} MTIME UTC)
+ if(MTIME STREQUAL ARCHIVE_MTIME_RFC3339)
+ message(FATAL_ERROR
+ "File has unexpected timestamp ${MTIME}")
+ endif()
+endforeach()