Sha256: 2b257082c640aaad64656b1adf544ad337d141ae7d505ea4770100234881049c

Contents?: true

Size: 1.17 KB

Versions: 53

Compression:

Stored size: 1.17 KB

Contents

(ql:quickload "lisp-unit")

(defpackage #:atbash-cipher-test
  (:use #:common-lisp #:lisp-unit))

#-xlisp-test (load "atbash-cipher")

(in-package #:atbash-cipher-test)

(define-test encode-no
  (assert-equal "ml" (atbash-cipher:encode "no")))

(define-test encode-yes
  (assert-equal "bvh" (atbash-cipher:encode "yes")))

(define-test encode-OMG
  (assert-equal "lnt" (atbash-cipher:encode "OMG")))

(define-test encode-O-M-G
  (assert-equal "lnt" (atbash-cipher:encode "O M G")))

(define-test encode-long-word
  (assert-equal "nrmwy oldrm tob"
                (atbash-cipher:encode "mindblowingly")))

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

(define-test encode-sentence
  (assert-equal "gifgs rhurx grlm"
                (atbash-cipher:encode "Truth is fiction.")))

(define-test encode-all-the-things
  (let ((plaintext "The quick brown fox jumps over the lazy dog.")
        (cipher "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"))
    (assert-equal cipher (atbash-cipher:encode plaintext))))

#-xlisp-test
(let ((*print-errors* t)
      (*print-failures* t))
  (run-tests :all :atbash-cipher-test))

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
trackler-2.0.5.16 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.15 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.14 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.13 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.12 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.11 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.10 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.9 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.8 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.7 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.6 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.5 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.4 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.3 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.2 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.1 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.5.0 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.4.0 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.3.9 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp
trackler-2.0.3.8 tracks/lisp/exercises/atbash-cipher/atbash-cipher-test.lisp