Sha256: 426fcb235acb15b93b80a4b6d24aa6a3205b3e402b16cccc53f8c42693a3ce9c

Contents?: true

Size: 1.45 KB

Versions: 396

Compression:

Stored size: 1.45 KB

Contents

(defmodule atbash-cipher-tests
  (behaviour ltest-unit)
  (export all))

(include-lib "ltest/include/ltest-macros.lfe")

(deftest encode-yes
  (is-equal "bvh" (atbash-cipher:encode "yes")))

(deftest encode-no
  (is-equal "ml" (atbash-cipher:encode "no")))

(deftest encode-OMG
  (is-equal "lnt" (atbash-cipher:encode "OMG")))

(deftest encode-spaces
  (is-equal "lnt" (atbash-cipher:encode "O M G")))

(deftest encode-mindblowingly
  (is-equal "nrmwy oldrm tob" (atbash-cipher:encode "mindblowingly")))

(deftest encode-numbers
  (is-equal "gvhgr mt123 gvhgr mt"
            (atbash-cipher:encode "Testing, 1 2 3, testing.")))

(deftest encode-deep-thought
  (is-equal "gifgs rhurx grlm" (atbash-cipher:encode "Truth is fiction.")))

(deftest encode-all-the-letters
  (let ((plain-text  "The quick brown fox jumps over the lazy dog.")
        (cipher-text "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"))
    (is-equal cipher-text (atbash-cipher:encode plain-text))))

(deftest decode-exercism
  (is-equal "exercism" (atbash-cipher:decode "vcvix rhn")))

(deftest decode-a-sentence
  (is-equal "anobstacleisoftenasteppingstone"
            (atbash-cipher:decode "zmlyh gzxov rhlug vmzhg vkkrm thglm v")))

(deftest decode-numbers
  (is-equal "testing123testing"
            (atbash-cipher:decode "gvhgr mt123 gvhgr mt")))

(deftest decode-all-the-letters
  (is-equal "thequickbrownfoxjumpsoverthelazydog"
            (atbash-cipher:decode "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt")))

Version data entries

396 entries across 396 versions & 1 rubygems

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