Skip to content

Commit e66be7c

Browse files
authored
Sync line-up (exercism#1047)
1 parent 7aea643 commit e66be7c

3 files changed

Lines changed: 79 additions & 1 deletion

File tree

bin/auto-sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
if [[ "$#" != 0 ]]; then
44
forwardedParameters=( "$@" )
55
else
6-
forwardedParameters=( -o -u -y --docs --filepaths --metadata --tests include )
6+
forwardedParameters=( -u -y --docs --filepaths --metadata --tests include )
77
fi
88

99
bin/configlet sync "${forwardedParameters[@]}"

exercises/practice/line-up/.meta/tests.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,24 @@ description = "format non-exceptional ordinal numeral 13"
5151
[2bdcebc5-c029-4874-b6cc-e9bec80d603a]
5252
description = "format exceptional ordinal numeral 21"
5353

54+
[a98e2e22-ab41-4557-a7c2-efedc19c16da]
55+
description = "format exceptional ordinal numeral 22 ending in nd even though it is a multiple of 11"
56+
57+
[ab45d2fb-e0ee-4016-b605-76917584db0a]
58+
description = "format exceptional ordinal numeral 33 ending in rd even though it is a multiple of 11"
59+
60+
[c9243603-9f17-45b3-9a41-db9ebdbf08e1]
61+
description = "format exceptional ordinal numeral 52 ending in nd even though it is a multiple of 13"
62+
5463
[74ee2317-0295-49d2-baf0-d56bcefa14e3]
5564
description = "format exceptional ordinal numeral 62"
5665

66+
[3f6c408c-4331-42b6-bb6c-3ad0823e568a]
67+
description = "format non-exceptional ordinal numeral 72 ending in nd even though it is a multiple of 12"
68+
69+
[8db52cd9-9689-413f-a812-6c36fcfd0d07]
70+
description = "format exceptional ordinal numeral 91 ending in st even though it is a multiple of 13"
71+
5772
[b37c332d-7f68-40e3-8503-e43cbd67a0c4]
5873
description = "format exceptional ordinal numeral 100"
5974

@@ -65,3 +80,6 @@ description = "format non-exceptional ordinal numeral 112"
6580

6681
[06b62efe-199e-4ce7-970d-4bf73945713f]
6782
description = "format exceptional ordinal numeral 123"
83+
84+
[6792c54e-59a7-4faf-839a-c4bb61014229]
85+
description = "format large number 972 ending in nd even though it is a multiple of 12"

exercises/practice/line-up/LineUpTest.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,36 @@ public function testFormatExceptionalOrdinalNumeral21(): void
152152
);
153153
}
154154

155+
/** uuid: a98e2e22-ab41-4557-a7c2-efedc19c16da */
156+
#[TestDox('format exceptional ordinal numeral 22 ending in nd even though it is a multiple of 11')]
157+
public function testFormatExceptionalOrdinalNumeral22EndingInNdEvenThoughItIsAMultipleOf11(): void
158+
{
159+
$this->assertSame(
160+
'Ingrid, you are the 22nd customer we serve today. Thank you!',
161+
format('Ingrid', 22)
162+
);
163+
}
164+
165+
/** uuid: ab45d2fb-e0ee-4016-b605-76917584db0a */
166+
#[TestDox('format exceptional ordinal numeral 33 ending in rd even though it is a multiple of 11')]
167+
public function testFormatExceptionalOrdinalNumeral33EndingInRdEvenThoughItIsAMultipleOf11(): void
168+
{
169+
$this->assertSame(
170+
'Mario, you are the 33rd customer we serve today. Thank you!',
171+
format('Mario', 33)
172+
);
173+
}
174+
175+
/** uuid: c9243603-9f17-45b3-9a41-db9ebdbf08e1 */
176+
#[TestDox('format exceptional ordinal numeral 52 ending in nd even though it is a multiple of 13')]
177+
public function testFormatExceptionalOrdinalNumeral52EndingInNdEvenThoughItIsAMultipleOf13(): void
178+
{
179+
$this->assertSame(
180+
'Quentin, you are the 52nd customer we serve today. Thank you!',
181+
format('Quentin', 52)
182+
);
183+
}
184+
155185
/** uuid: 74ee2317-0295-49d2-baf0-d56bcefa14e3 */
156186
#[TestDox('Format exceptional ordinal numeral 62')]
157187
public function testFormatExceptionalOrdinalNumeral62(): void
@@ -162,6 +192,26 @@ public function testFormatExceptionalOrdinalNumeral62(): void
162192
);
163193
}
164194

195+
/** uuid: 3f6c408c-4331-42b6-bb6c-3ad0823e568a */
196+
#[TestDox('format non-exceptional ordinal numeral 72 ending in nd even though it is a multiple of 12')]
197+
public function testFormatNonExceptionalOrdinalNumeral72EndingInNdEvenThoughItIsAMultipleOf12(): void
198+
{
199+
$this->assertSame(
200+
'Ugo, you are the 72nd customer we serve today. Thank you!',
201+
format('Ugo', 72)
202+
);
203+
}
204+
205+
/** uuid: 8db52cd9-9689-413f-a812-6c36fcfd0d07 */
206+
#[TestDox('format exceptional ordinal numeral 91 ending in st even though it is a multiple of 13')]
207+
public function testFormatExceptionalOrdinalNumeral91EndingInStEvenThoughItIsAMultipleOf13(): void
208+
{
209+
$this->assertSame(
210+
'Boris, you are the 91st customer we serve today. Thank you!',
211+
format('Boris', 91)
212+
);
213+
}
214+
165215
/** uuid: b37c332d-7f68-40e3-8503-e43cbd67a0c4 */
166216
#[TestDox('Format exceptional ordinal numeral 100')]
167217
public function testFormatExceptionalOrdinalNumeral100(): void
@@ -201,4 +251,14 @@ public function testFormatExceptionalOrdinalNumeral123(): void
201251
format('Yma', 123)
202252
);
203253
}
254+
255+
/** uuid: 6792c54e-59a7-4faf-839a-c4bb61014229 */
256+
#[TestDox('format large number 972 ending in nd even though it is a multiple of 12')]
257+
public function testFormatLargeNumber972EndingInNdEvenThoughItIsAMultipleOf12(): void
258+
{
259+
$this->assertSame(
260+
'Elias, you are the 972nd customer we serve today. Thank you!',
261+
format('Elias', 972)
262+
);
263+
}
204264
}

0 commit comments

Comments
 (0)