From 130ce3535f931c373d1db26f4b62b539581c56f7 Mon Sep 17 00:00:00 2001 From: rbasso Date: Mon, 6 Mar 2017 23:11:57 +0900 Subject: [PATCH 1/2] atbash-cipher: Make canonical-data.json compliant --- exercises/atbash-cipher/canonical-data.json | 28 +++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/exercises/atbash-cipher/canonical-data.json b/exercises/atbash-cipher/canonical-data.json index bef84eed6c..97c0729f7b 100644 --- a/exercises/atbash-cipher/canonical-data.json +++ b/exercises/atbash-cipher/canonical-data.json @@ -1,77 +1,95 @@ { - "#": [ + "exercise": "atbash-cipher", + "version": "1.0.0", + "comments": [ "The tests are divided into two groups: ", "* Encoding from English to atbash cipher", "* Decoding from atbash cipher to all-lowercase-mashed-together English" ], - "encode": { - "description": ["Test encoding from English to atbash"], + "cases": [ + { + "description": "encode", + "comments": ["Test encoding from English to atbash"], "cases": [ { "description": "encode yes", + "property": "encode", "phrase": "yes", "expected": "bvh" }, { "description": "encode no", + "property": "encode", "phrase": "no", "expected": "ml" }, { "description": "encode OMG", + "property": "encode", "phrase": "OMG", "expected": "lnt" }, { "description": "encode spaces", + "property": "encode", "phrase": "O M G", "expected": "lnt" }, { "description": "encode mindblowingly", + "property": "encode", "phrase": "mindblowingly", "expected": "nrmwy oldrm tob" }, { "description": "encode numbers", + "property": "encode", "phrase": "Testing,1 2 3, testing.", "expected": "gvhgr mt123 gvhgr mt" }, { "description": "encode deep thought", + "property": "encode", "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.", "expected": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" } ] }, - "decode": { - "description": ["Test decoding from atbash to English"], + { + "description": "decode", + "comments": ["Test decoding from atbash to English"], "cases": [ { "description": "decode exercism", + "property": "decode", "phrase": "vcvix rhn", "expected": "exercism" }, { "description": "decode a sentence", + "property": "decode", "phrase": "zmlyh gzxov rhlug vmzhg vkkrm thglm v", "expected": "anobstacleisoftenasteppingstone" }, { "description": "decode numbers", + "property": "decode", "phrase": "gvhgr mt123 gvhgr mt", "expected": "testing123testing" }, { "description": "decode all the letters", + "property": "decode", "phrase": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt", "expected": "thequickbrownfoxjumpsoverthelazydog" } ] } + ] } From bb4f220f5cef774ba05c16142a46844b2b390ead Mon Sep 17 00:00:00 2001 From: rbasso Date: Mon, 6 Mar 2017 23:16:16 +0900 Subject: [PATCH 2/2] atbash-cipher: Fix canonical-data.json formatting --- exercises/atbash-cipher/canonical-data.json | 170 ++++++++++---------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/exercises/atbash-cipher/canonical-data.json b/exercises/atbash-cipher/canonical-data.json index 97c0729f7b..56d30946ed 100644 --- a/exercises/atbash-cipher/canonical-data.json +++ b/exercises/atbash-cipher/canonical-data.json @@ -1,95 +1,95 @@ -{ +{ "exercise": "atbash-cipher", "version": "1.0.0", "comments": [ - "The tests are divided into two groups: ", - "* Encoding from English to atbash cipher", - "* Decoding from atbash cipher to all-lowercase-mashed-together English" - ], + "The tests are divided into two groups: ", + "* Encoding from English to atbash cipher", + "* Decoding from atbash cipher to all-lowercase-mashed-together English" + ], "cases": [ { - "description": "encode", - "comments": ["Test encoding from English to atbash"], - "cases": [ - { - "description": "encode yes", - "property": "encode", - "phrase": "yes", - "expected": "bvh" - }, - { - "description": "encode no", - "property": "encode", - "phrase": "no", - "expected": "ml" - }, - { - "description": "encode OMG", - "property": "encode", - "phrase": "OMG", - "expected": "lnt" - }, - { - "description": "encode spaces", - "property": "encode", - "phrase": "O M G", - "expected": "lnt" - }, - { - "description": "encode mindblowingly", - "property": "encode", - "phrase": "mindblowingly", - "expected": "nrmwy oldrm tob" - }, - { - "description": "encode numbers", - "property": "encode", - "phrase": "Testing,1 2 3, testing.", - "expected": "gvhgr mt123 gvhgr mt" - }, - { - "description": "encode deep thought", - "property": "encode", - "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.", - "expected": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" - } - ] + "description": "encode", + "comments": [ "Test encoding from English to atbash" ], + "cases": [ + { + "description": "encode yes", + "property": "encode", + "phrase": "yes", + "expected": "bvh" + }, + { + "description": "encode no", + "property": "encode", + "phrase": "no", + "expected": "ml" + }, + { + "description": "encode OMG", + "property": "encode", + "phrase": "OMG", + "expected": "lnt" + }, + { + "description": "encode spaces", + "property": "encode", + "phrase": "O M G", + "expected": "lnt" + }, + { + "description": "encode mindblowingly", + "property": "encode", + "phrase": "mindblowingly", + "expected": "nrmwy oldrm tob" + }, + { + "description": "encode numbers", + "property": "encode", + "phrase": "Testing,1 2 3, testing.", + "expected": "gvhgr mt123 gvhgr mt" + }, + { + "description": "encode deep thought", + "property": "encode", + "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.", + "expected": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" + } + ] }, { - "description": "decode", - "comments": ["Test decoding from atbash to English"], - "cases": [ - { - "description": "decode exercism", - "property": "decode", - "phrase": "vcvix rhn", - "expected": "exercism" - }, - { - "description": "decode a sentence", - "property": "decode", - "phrase": "zmlyh gzxov rhlug vmzhg vkkrm thglm v", - "expected": "anobstacleisoftenasteppingstone" - }, - { - "description": "decode numbers", - "property": "decode", - "phrase": "gvhgr mt123 gvhgr mt", - "expected": "testing123testing" - }, - { - "description": "decode all the letters", - "property": "decode", - "phrase": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt", - "expected": "thequickbrownfoxjumpsoverthelazydog" - } - ] + "description": "decode", + "comments": [ "Test decoding from atbash to English" ], + "cases": [ + { + "description": "decode exercism", + "property": "decode", + "phrase": "vcvix rhn", + "expected": "exercism" + }, + { + "description": "decode a sentence", + "property": "decode", + "phrase": "zmlyh gzxov rhlug vmzhg vkkrm thglm v", + "expected": "anobstacleisoftenasteppingstone" + }, + { + "description": "decode numbers", + "property": "decode", + "phrase": "gvhgr mt123 gvhgr mt", + "expected": "testing123testing" + }, + { + "description": "decode all the letters", + "property": "decode", + "phrase": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt", + "expected": "thequickbrownfoxjumpsoverthelazydog" + } + ] } ] }