This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #499 from gdrooid/capitalize
Renamed Capitalize as Uppercase (issue #489)
- Loading branch information
Showing
6 changed files
with
48 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
package DDG::Goodie::Uppercase; | ||
|
||
use DDG::Goodie; | ||
|
||
triggers startend => 'uppercase', 'upper case', 'allcaps', 'all caps'; | ||
|
||
zci is_cached => 1; | ||
zci answer_type => "uppercase"; | ||
|
||
primary_example_queries 'uppercase this'; | ||
secondary_example_queries 'upper case that'; | ||
|
||
name 'Uppercase'; | ||
description 'Make a string uppercase.'; | ||
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Uppercase.pm'; | ||
category 'conversions'; | ||
topics 'programming'; | ||
|
||
attribution twitter => 'crazedpsyc', | ||
cpan => 'CRZEDPSYC' ; | ||
|
||
handle remainder => sub { uc ($_) }; | ||
|
||
1; |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More; | ||
use DDG::Test::Goodie; | ||
|
||
zci answer_type => 'uppercase'; | ||
zci is_cached => 1; | ||
|
||
ddg_goodie_test( | ||
[qw( | ||
DDG::Goodie::Uppercase | ||
)], | ||
'upper case this' => test_zci('THIS'), | ||
'uppercase that' => test_zci('THAT'), | ||
'allcaps this string' => test_zci('THIS STRING'), | ||
'that string all caps' => test_zci('THAT STRING'), | ||
'is this uppercase, sir?' => undef, | ||
); | ||
|
||
done_testing; |