Sha256: bad293302f1b1bfe95f1ff7fd28aa1b058be9abe680415c493ea398b30eda107

Contents?: true

Size: 1.06 KB

Versions: 396

Compression:

Stored size: 1.06 KB

Contents

;;; atbash-cipher-test.el --- Tests for Atbash Cipher (exercism)

;;; Commentary:

;;; Code:

(require 'cl)

(load-file "atbash-cipher.el")

(ert-deftest encode-no ()
  (should (equal "ml" (encode "no"))))

(ert-deftest encode-yes ()
  (should (equal "bvh" (encode "yes"))))

(ert-deftest encode-OMG ()
  (should (equal "lnt" (encode "OMG"))))

(ert-deftest encode-O-M-G ()
  (should (equal "lnt" (encode "O M G"))))

(ert-deftest encode-long-word ()
  (should (equal "nrmwy oldrm tob"
                 (encode "mindblowingly"))))

(ert-deftest encode-numbers ()
  (should (equal "gvhgr mt123 gvhgr mt"
                 (encode "Testing, 1 2 3, testing."))))

(ert-deftest encode-sentence ()
  (should (equal "gifgs rhurx grlm"
                 (encode "Truth is fiction."))))

(ert-deftest encode-all-the-things ()
  (let ((plaintext "The quick brown fox jumps over the lazy dog.")
        (ciphertext "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"))
    (should (equal ciphertext
                   (encode plaintext)))))

(provide 'atbash-cipher-test)
;;; atbash-cipher-test.el ends here

Version data entries

396 entries across 396 versions & 1 rubygems

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