Sha256: 5bd4b1c11990969f8fe0c41c1b7697e9b1bae0c2d3ba4a5e66b0b0dbb6cbdf24

Contents?: true

Size: 1.42 KB

Versions: 220

Compression:

Stored size: 1.42 KB

Contents

" The tests are divided into two groups:
"
"   - encoding from English to atbash cipher
"   - decoding from atbash cipher to all-lowercase-mashed-together English

" Test encoding from English to atbash

Execute (encode yes):
  AssertEqual 'bvh', AtbashEncode('yes')

Execute (encode no):
  AssertEqual 'ml', AtbashEncode('no')

Execute (encode OMG):
  AssertEqual 'lnt', AtbashEncode('OMG')

Execute (encode spaces):
  AssertEqual 'lnt', AtbashEncode('O M G')

Execute (encode mindblowingly):
  AssertEqual 'nrmwy oldrm tob', AtbashEncode('mindblowingly')

Execute (encode numbers):
  AssertEqual 'gvhgr mt123 gvhgr mt', AtbashEncode('Testing,1 2 3, testing.')

Execute (encode deep thought):
  AssertEqual 'gifgs rhurx grlm', AtbashEncode('Truth is fiction.')

Execute (encode all the letters):
  AssertEqual
    \ 'gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt',
    \ AtbashEncode('The quick brown fox jumps over the lazy dog.')

" Test decoding from atbash to English

Execute (decode exercism):
  AssertEqual 'exercism', AtbashDecode('vcvix rhn')

Execute (decode a sentence):
  AssertEqual
    \ 'anobstacleisoftenasteppingstone',
    \ AtbashDecode('zmlyh gzxov rhlug vmzhg vkkrm thglm v')

Execute (decode numbers):
  AssertEqual 'testing123testing', AtbashDecode('gvhgr mt123 gvhgr mt')

Execute (decode all the letters):
  AssertEqual
    \ 'thequickbrownfoxjumpsoverthelazydog',
    \ AtbashDecode('gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt')

Version data entries

220 entries across 220 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.179 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.178 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.177 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.176 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.175 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.174 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.173 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.172 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.171 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.170 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.169 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.167 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.166 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.165 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.164 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.163 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.162 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.161 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader
trackler-2.2.1.160 tracks/vimscript/exercises/atbash-cipher/atbash_cipher.vader