develooper Front page | perl.perl5.porters | Postings from September 2013

[perl #119625] [PATCH] e7c16d9 Update README copyright to 2013, and add test

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
September 5, 2013 17:14
Subject:
[perl #119625] [PATCH] e7c16d9 Update README copyright to 2013, and add test
Message ID:
rt-3.6.HEAD-1873-1378401232-1028.119625-15-0@perl.org
On Thu Sep 05 07:00:10 2013, smylers@stripey.com wrote:
> diff --git a/t/porting/copyright.t b/t/porting/copyright.t
> new file mode 100644
> index 0000000..48ea7b4
> --- /dev/null
> +++ b/t/porting/copyright.t
> @@ -0,0 +1,24 @@
> +#!perl
> +
> +=head1 NAME
> +
> +copyright.t
> +
> +=head1 DESCRIPTION
> +
> +Tests that the copyright notice in the top-level README file includes
> the
> +current year.
> +
> +=cut
> +
> +
> +BEGIN { chdir 't'; require './test.pl' }
> +
> +
> +open my $readme, '<', '../README' or die "Opening README failed: $!";
> +local $/ = '';
> +my $copyright_msg = <$readme>;
> +my $year = (gmtime)[5] + 1900;
> +like $copyright_msg, qr/\b$year\b/, 'current year in README copyright
> message';
> +
> +done_testing;

Hmm.  If I’m reading this correctly, then when I try to install last
year’s perl then tests will fail.

I would prefer a note in the release manager’s guide.

While you could see whether the tests are being run under a git
repository and see whether there are any commits in the current year
before checking the README, that could *still* produce false positives;
e.g., for downstream packagers.  That would be rare; nevertheless, if
the correct thing to do is to ignore test failures under some
circumstance, that suggests there is something wrong with the tests. 

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119625

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About