Skip to content

atbash-cipher: Apply new "input" policy #1057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 38 additions & 14 deletions exercises/atbash-cipher/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"exercise": "atbash-cipher",
"version": "1.0.0",
"version": "1.1.0",
"comments": [
"The tests are divided into two groups: ",
"* Encoding from English to atbash cipher",
Expand All @@ -14,49 +14,65 @@
{
"description": "encode yes",
"property": "encode",
"phrase": "yes",
"input": {
"phrase": "yes"
},
"expected": "bvh"
},
{
"description": "encode no",
"property": "encode",
"phrase": "no",
"input": {
"phrase": "no"
},
"expected": "ml"
},
{
"description": "encode OMG",
"property": "encode",
"phrase": "OMG",
"input": {
"phrase": "OMG"
},
"expected": "lnt"
},
{
"description": "encode spaces",
"property": "encode",
"phrase": "O M G",
"input": {
"phrase": "O M G"
},
"expected": "lnt"
},
{
"description": "encode mindblowingly",
"property": "encode",
"phrase": "mindblowingly",
"input": {
"phrase": "mindblowingly"
},
"expected": "nrmwy oldrm tob"
},
{
"description": "encode numbers",
"property": "encode",
"phrase": "Testing,1 2 3, testing.",
"input": {
"phrase": "Testing,1 2 3, testing."
},
"expected": "gvhgr mt123 gvhgr mt"
},
{
"description": "encode deep thought",
"property": "encode",
"phrase": "Truth is fiction.",
"input": {
"phrase": "Truth is fiction."
},
"expected": "gifgs rhurx grlm"
},
{
"description": "encode all the letters",
"property": "encode",
"phrase": "The quick brown fox jumps over the lazy dog.",
"input": {
"phrase": "The quick brown fox jumps over the lazy dog."
},
"expected": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
}
]
Expand All @@ -68,28 +84,36 @@
{
"description": "decode exercism",
"property": "decode",
"phrase": "vcvix rhn",
"input": {
"phrase": "vcvix rhn"
},
"expected": "exercism"
},
{
"description": "decode a sentence",
"property": "decode",
"phrase": "zmlyh gzxov rhlug vmzhg vkkrm thglm v",
"input": {
"phrase": "zmlyh gzxov rhlug vmzhg vkkrm thglm v"
},
"expected": "anobstacleisoftenasteppingstone"
},
{
"description": "decode numbers",
"property": "decode",
"phrase": "gvhgr mt123 gvhgr mt",
"input": {
"phrase": "gvhgr mt123 gvhgr mt"
},
"expected": "testing123testing"
},
{
"description": "decode all the letters",
"property": "decode",
"phrase": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt",
"input": {
"phrase": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
},
"expected": "thequickbrownfoxjumpsoverthelazydog"
}
]
}
]
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a carriage return here?