Repository: lucy-clownfish Updated Branches: refs/heads/master e4a94bca5 -> 00acd7c12
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/00acd7c1 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/00acd7c1 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/00acd7c1 Branch: refs/heads/master Commit: 00acd7c121edc9ed58a630215d307731ead76c91 Parents: e4a94bc Author: Nick Wellnhofer <[email protected]> Authored: Sat Apr 9 15:31:39 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sat Apr 9 15:31:39 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/00acd7c1/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" );
