Repository: lucy-clownfish Updated Branches: refs/heads/0.5 cf9d70341 -> 0ff0d586d
Change timestamp in write_if_changed test Might fix CLOWNFISH-68. Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/0ff0d586 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/0ff0d586 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/0ff0d586 Branch: refs/heads/0.5 Commit: 0ff0d586dc98523df9d58f72c53f91ea49946ba3 Parents: cf9d703 Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Sat Apr 9 15:31:39 2016 +0200 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Sat Apr 9 15:37:46 2016 +0200 ---------------------------------------------------------------------- compiler/perl/t/001-util.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/0ff0d586/compiler/perl/t/001-util.t ---------------------------------------------------------------------- diff --git a/compiler/perl/t/001-util.t b/compiler/perl/t/001-util.t index 745bb69..57f1494 100644 --- a/compiler/perl/t/001-util.t +++ b/compiler/perl/t/001-util.t @@ -39,14 +39,14 @@ ok( !current( $foo_txt, "nonexistent_file" ), "not current when dest file mising" ); -my $one_second_ago = time() - 1; -utime( $one_second_ago, $one_second_ago, $foo_txt ) +my $ten_seconds_ago = time() - 10; +utime( $ten_seconds_ago, $ten_seconds_ago, $foo_txt ) or die "utime failed"; write_if_changed( $foo_txt, "foo" ); -is( stat($foo_txt)->mtime, $one_second_ago, +is( stat($foo_txt)->mtime, $ten_seconds_ago, "write_if_changed does nothing if contents not changed" ); write_if_changed( $foo_txt, "foofoo" ); -ok( stat($foo_txt)->mtime != $one_second_ago, +ok( stat($foo_txt)->mtime != $ten_seconds_ago, "write_if_changed writes if contents changed" );