Skip to content

simple-cipher: validating input strings #1298

Closed
@xarxziux

Description

@xarxziux

I've already raised this as a separate issue in exercism/javascript#445, but have just discovered that I should be raising it here.

The unit tests for the Simple Cipher include testing for an error if the cipher is all caps, or all digits, but this is in adequate for the description. Part of the instructions state: "Let's make your substitution cipher a little more fault tolerant by ... ensuring that the key contains only lowercase letters".

Unfortunately this is not checked for, and I've seen one case where the submission passed the tests but did not conform to the description. The addition of tests for spaces or punctuation marks in the key would have failed the submission.

The specification needs to be updated to include these kind of checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions