Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl

Issue 20652002: Fix trailing whitespace in scripts and misc. files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't change literal diff. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/perl -w 1 #!/usr/bin/perl -w
2 # 2 #
3 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) 3 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
4 # Copyright (C) 2010 Research In Motion Limited. All rights reserved. 4 # Copyright (C) 2010 Research In Motion Limited. All rights reserved.
5 # 5 #
6 # Redistribution and use in source and binary forms, with or without 6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions 7 # modification, are permitted provided that the following conditions
8 # are met: 8 # are met:
9 # 1. Redistributions of source code must retain the above copyright 9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 22 matching lines...) Expand all
33 33
34 my @testCaseHashRefs = ( 34 my @testCaseHashRefs = (
35 { 35 {
36 testName => "New entry inserted earlier in the file, but after an entry with the same author and date, patch applied a day later.", 36 testName => "New entry inserted earlier in the file, but after an entry with the same author and date, patch applied a day later.",
37 reviewer => "Sue", 37 reviewer => "Sue",
38 epochTime => 1273414321, 38 epochTime => 1273414321,
39 patch => <<'END', 39 patch => <<'END',
40 --- ChangeLog 40 --- ChangeLog
41 +++ ChangeLog 41 +++ ChangeLog
42 @@ -70,6 +70,14 @@ 42 @@ -70,6 +70,14 @@
43 43
44 2010-05-08 Alice <alice@email.address> 44 2010-05-08 Alice <alice@email.address>
45 45
46 + Reviewed by NOBODY (OOPS!). 46 + Reviewed by NOBODY (OOPS!).
47 + 47 +
48 + Changed some more code on 2010-05-08. 48 + Changed some more code on 2010-05-08.
49 + 49 +
50 + * File: 50 + * File:
51 + 51 +
52 +2010-05-08 Alice <alice@email.address> 52 +2010-05-08 Alice <alice@email.address>
53 + 53 +
54 Reviewed by Ray. 54 Reviewed by Ray.
55 55
56 Changed some code on 2010-05-08. 56 Changed some code on 2010-05-08.
57 END 57 END
58 expectedReturn => <<'END', 58 expectedReturn => <<'END',
59 --- ChangeLog 59 --- ChangeLog
60 +++ ChangeLog 60 +++ ChangeLog
61 @@ -1,3 +1,11 @@ 61 @@ -1,3 +1,11 @@
62 +2010-05-09 Alice <alice@email.address> 62 +2010-05-09 Alice <alice@email.address>
63 + 63 +
64 + Reviewed by Sue. 64 + Reviewed by Sue.
65 + 65 +
66 + Changed some more code on 2010-05-08. 66 + Changed some more code on 2010-05-08.
67 + 67 +
68 + * File: 68 + * File:
69 + 69 +
70 2010-05-08 Alice <alice@email.address> 70 2010-05-08 Alice <alice@email.address>
71 71
72 Reviewed by Ray. 72 Reviewed by Ray.
73 END 73 END
74 }, 74 },
75 ); 75 );
76 76
77 my $testCasesCount = @testCaseHashRefs; 77 my $testCasesCount = @testCaseHashRefs;
78 plan(tests => 1 * $testCasesCount); # Total number of assertions. 78 plan(tests => 1 * $testCasesCount); # Total number of assertions.
79 79
80 foreach my $testCase (@testCaseHashRefs) { 80 foreach my $testCase (@testCaseHashRefs) {
81 my $testNameStart = "setChangeLogDateAndReviewer(fixChangeLogPatch()): $test Case->{testName}: comparing"; 81 my $testNameStart = "setChangeLogDateAndReviewer(fixChangeLogPatch()): $test Case->{testName}: comparing";
82 82
83 my $patch = $testCase->{patch}; 83 my $patch = $testCase->{patch};
84 my $reviewer = $testCase->{reviewer}; 84 my $reviewer = $testCase->{reviewer};
85 my $epochTime = $testCase->{epochTime}; 85 my $epochTime = $testCase->{epochTime};
86 86
87 my $fixedChangeLog = VCSUtils::fixChangeLogPatch($patch); 87 my $fixedChangeLog = VCSUtils::fixChangeLogPatch($patch);
88 my $got = VCSUtils::setChangeLogDateAndReviewer($fixedChangeLog->{patch}, $r eviewer, $epochTime); 88 my $got = VCSUtils::setChangeLogDateAndReviewer($fixedChangeLog->{patch}, $r eviewer, $epochTime);
89 my $expectedReturn = $testCase->{expectedReturn}; 89 my $expectedReturn = $testCase->{expectedReturn};
90 90
91 is($got, $expectedReturn, "$testNameStart return value."); 91 is($got, $expectedReturn, "$testNameStart return value.");
92 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698