From 4d72c4c11e3aff65e9bb36e5fcf75f088b140049 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 10 Jul 2002 12:59:07 +0000 Subject: Implement SysV-style $$@ support. I looked at E.Parmelan's patch but decided to implement this a different way, and didn't use it. --- tests/test_driver.pl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'tests/test_driver.pl') diff --git a/tests/test_driver.pl b/tests/test_driver.pl index a7a3b9f..38ee54a 100644 --- a/tests/test_driver.pl +++ b/tests/test_driver.pl @@ -825,15 +825,29 @@ sub remove_directory_tree_inner sub touch { - local (@filenames) = @_; local ($file); - foreach $file (@filenames) { + foreach $file (@_) { (open(T, ">> $file") && print(T "\n") && close(T)) || &error("Couldn't touch $file: $!\n", 1); } } +# Touch with a time offset. To DTRT, call touch() then use stat() to get the +# access/mod time for each file and apply the offset. + +sub utouch +{ + local ($off) = shift; + local ($file); + + &touch(@_); + + local (@s) = stat($_[0]); + + utime($s[8]+$off, $s[9]+$off, @_); +} + # open a file, write some stuff to it, and close it. sub create_file -- cgit v1.2.3