Skip to content

Commit 496e06d

Browse files
authored
acronym: Update test cases (#428)
Adds one missing test case from the canonical test data and stores the test data version.
1 parent abcc6b5 commit 496e06d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

exercises/acronym/acronym_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from acronym import abbreviate
44

55

6-
class AcronymTest(unittest.TestCase):
6+
# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0
77

8+
class AcronymTest(unittest.TestCase):
89
def test_basic(self):
910
self.assertEqual('PNG', abbreviate('Portable Network Graphics'))
1011

@@ -20,6 +21,9 @@ def test_punctuation(self):
2021
def test_all_caps_words(self):
2122
self.assertEqual('PHP', abbreviate('PHP: Hypertext Preprocessor'))
2223

24+
def test_non_acronym_all_caps_word(self):
25+
self.assertEqual('GIMP', abbreviate('GNU Image Manipulation Program'))
26+
2327
def test_hyphenated(self):
2428
self.assertEqual('CMOS', abbreviate('Complementary metal-oxide semiconductor'))
2529

0 commit comments

Comments
 (0)