-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can be useful for sanitization (sp?) of Changelogs. For example, the work copy of the changelog can contain all the acceptable groups, and we might want to filter away those that weren't used for a specific release.
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More tests => 2; | ||
|
||
use CPAN::Changes; | ||
|
||
my $changes = CPAN::Changes->load_string(<<'END_CHANGES'); | ||
0.2 2012-02-01 | ||
[D] | ||
[E] | ||
- Yadah | ||
0.1 2011-01-01 | ||
[A] | ||
- Stuff | ||
[B] | ||
[C] | ||
- Blah | ||
END_CHANGES | ||
|
||
$changes->delete_empty_groups; | ||
|
||
is_deeply( [ sort( ($changes->releases)[0]->groups ) ], [ qw/ A C / ] ); | ||
is_deeply( [ sort( ($changes->releases)[1]->groups ) ], [ 'E' ] ); | ||
|
||
|