tracks/perl6/exercises/acronym/acronym.t in trackler-2.2.1.86 vs tracks/perl6/exercises/acronym/acronym.t in trackler-2.2.1.87
- old
+ new
@@ -22,56 +22,68 @@
require ::($module) <&abbreviate>;
my $c-data = from-json $=pod.pop.contents;
for $c-data<cases>»<cases>».Array.flat {
- is abbreviate(.<phrase>), |.<expected description>;
+ is abbreviate(.<input><phrase>), |.<expected description>;
}
=head2 Canonical Data
=begin code
{
"exercise": "acronym",
- "version": "1.1.0",
+ "version": "1.2.0",
"cases": [
{
"description": "Abbreviate a phrase",
"cases": [
{
"description": "basic",
"property": "abbreviate",
- "phrase": "Portable Network Graphics",
+ "input": {
+ "phrase": "Portable Network Graphics"
+ },
"expected": "PNG"
},
{
"description": "lowercase words",
"property": "abbreviate",
- "phrase": "Ruby on Rails",
+ "input": {
+ "phrase": "Ruby on Rails"
+ },
"expected": "ROR"
},
{
"description": "punctuation",
"property": "abbreviate",
- "phrase": "First In, First Out",
+ "input": {
+ "phrase": "First In, First Out"
+ },
"expected": "FIFO"
},
{
"description": "all caps words",
"property": "abbreviate",
- "phrase": "PHP: Hypertext Preprocessor",
+ "input": {
+ "phrase": "PHP: Hypertext Preprocessor"
+ },
"expected": "PHP"
},
{
"description": "non-acronym all caps word",
"property": "abbreviate",
- "phrase": "GNU Image Manipulation Program",
+ "input": {
+ "phrase": "GNU Image Manipulation Program"
+ },
"expected": "GIMP"
},
{
"description": "hyphenated",
"property": "abbreviate",
- "phrase": "Complementary metal-oxide semiconductor",
+ "input": {
+ "phrase": "Complementary metal-oxide semiconductor"
+ },
"expected": "CMOS"
}
]
}
]