From da7be5f8c18879d1ca21f76470fc83d2c5cbd1c4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 18 Mar 2018 00:31:56 +0300 Subject: Add support for copying file timestamps by cpfile() --- tests/entry-time/buildfile | 8 +++ tests/entry-time/driver.cxx | 151 ++++++++++++++++++++++++++++++++++++++++++++ tests/entry-time/testscript | 63 ++++++++++++++++++ 3 files changed, 222 insertions(+) create mode 100644 tests/entry-time/buildfile create mode 100644 tests/entry-time/driver.cxx create mode 100644 tests/entry-time/testscript (limited to 'tests/entry-time') diff --git a/tests/entry-time/buildfile b/tests/entry-time/buildfile new file mode 100644 index 0000000..7219149 --- /dev/null +++ b/tests/entry-time/buildfile @@ -0,0 +1,8 @@ +# file : tests/entry-time/buildfile +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +import libs = libbutl%lib{butl} +libs += $stdmod_lib + +exe{driver}: {hxx cxx}{*} $libs test{testscript} diff --git a/tests/entry-time/driver.cxx b/tests/entry-time/driver.cxx new file mode 100644 index 0000000..91e9bbc --- /dev/null +++ b/tests/entry-time/driver.cxx @@ -0,0 +1,151 @@ +// file : tests/entry-time/driver.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#include + +#ifndef __cpp_lib_modules +#include +#include +#include +#endif + +// Other includes. + +#ifdef __cpp_modules +#ifdef __cpp_lib_modules +import std.core; +import std.io; +#endif +import butl.path; +import butl.filesystem; + +import butl.optional; // @@ MOD Clang should not be necessary. +#else +#include +#include +#include +#include +#endif + +using namespace std; +using namespace butl; + +// Usage: argv[0] (-p|-s