Sha256: 7d6cd0b2fbe148b1fd905b8bd5370dd2ec2a955aba5c112bdfa2412acd6cba64

Contents?: true

Size: 1.89 KB

Versions: 55

Compression:

Stored size: 1.89 KB

Contents

{
    "cases": [
        {
            "description": "count one word",
            "input": "word",
            "expected": {"word": 1}
        },
        {
            "description": "count one of each word",
            "input": "one of each",
            "expected": { "one": 1, "of": 1, "each": 1 }
        },
        {
            "description": "multiple occurrences of a word",
            "input": "one fish two fish red fish blue fish",
            "expected": { "one": 1, "fish": 4, "two": 1, "red": 1, "blue": 1 }
        },
        {
            "description": "handles cramped lists",
            "input": "one,two,three",
            "expected": { "one": 1, "two": 1, "three": 1 }
        },
        {
            "description": "handles expanded lists",
            "input": "one,\ntwo,\nthree",
            "expected": { "one": 1, "two": 1, "three": 1 }
        },
        {
            "description": "ignore punctuation",
            "input": "car: carpet as java: javascript!!&@$%^&",
            "expected": { "car": 1, "carpet": 1, "as": 1, "java": 1, "javascript": 1 }
        },
        {
            "description": "include numbers",
            "input": "testing, 1, 2 testing",
            "expected": { "testing": 2, "1": 1, "2": 1 }
        },
        {
            "description": "normalize case",
            "input": "go Go GO Stop stop",
            "expected": { "go": 3, "stop": 2 }
        },
        {
            "description": "with apostrophes",
            "input": "First: don't laugh. Then: don't cry.",
            "expected": { "first": 1, "don't": 2, "laugh": 1, "then": 1, "cry": 1 }
        },
        {
            "description": "with_quotations",
            "input": "Joe can't tell between 'large' and large.",
            "expected": { "joe": 1, "can't": 1, "tell": 1, "between": 1, "large": 2, "and": 1 }
        }
    ]
}

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
trackler-2.0.6.2 common/exercises/word-count/canonical-data.json
trackler-2.0.6.1 common/exercises/word-count/canonical-data.json
trackler-2.0.6.0 common/exercises/word-count/canonical-data.json
trackler-2.0.5.18 common/exercises/word-count/canonical-data.json
trackler-2.0.5.17 common/exercises/word-count/canonical-data.json
trackler-2.0.5.16 common/exercises/word-count/canonical-data.json
trackler-2.0.5.15 common/exercises/word-count/canonical-data.json
trackler-2.0.5.14 common/exercises/word-count/canonical-data.json
trackler-2.0.5.13 common/exercises/word-count/canonical-data.json
trackler-2.0.5.12 common/exercises/word-count/canonical-data.json
trackler-2.0.5.11 common/exercises/word-count/canonical-data.json
trackler-2.0.5.10 common/exercises/word-count/canonical-data.json
trackler-2.0.5.9 common/exercises/word-count/canonical-data.json
trackler-2.0.5.8 common/exercises/word-count/canonical-data.json
trackler-2.0.5.7 common/exercises/word-count/canonical-data.json
trackler-2.0.5.6 common/exercises/word-count/canonical-data.json
trackler-2.0.5.5 common/exercises/word-count/canonical-data.json
trackler-2.0.5.4 common/exercises/word-count/canonical-data.json
trackler-2.0.5.3 common/exercises/word-count/canonical-data.json
trackler-2.0.5.2 common/exercises/word-count/canonical-data.json