diff --git a/exercises/word-count/.meta/additional_tests.json b/exercises/word-count/.meta/additional_tests.json index 5385939838..39c9d22cbb 100644 --- a/exercises/word-count/.meta/additional_tests.json +++ b/exercises/word-count/.meta/additional_tests.json @@ -33,6 +33,16 @@ "is": 1, "broken": 1 } + }, + { + "description": "multiple apostrophes ignored", + "property": "countWords", + "input": { + "sentence": "''hey''" + }, + "expected": { + "hey": 1 + } } ] } diff --git a/exercises/word-count/word_count_test.py b/exercises/word-count/word_count_test.py index 2d0317b5c5..741781631b 100644 --- a/exercises/word-count/word_count_test.py +++ b/exercises/word-count/word_count_test.py @@ -105,6 +105,9 @@ def test_non_alphanumeric(self): {"hey": 1, "my": 1, "spacebar": 1, "is": 1, "broken": 1}, ) + def test_multiple_apostrophes_ignored(self): + self.assertEqual(count_words("''hey''"), {"hey": 1}) + if __name__ == "__main__": unittest.main()