Sha256: b64b2bb5060e54a1dd148317bfb8c371a7a24f7df3593bb702937448e7cc85b5

Contents?: true

Size: 1.11 KB

Versions: 178

Compression:

Stored size: 1.11 KB

Contents

if !System.get_env("EXERCISM_TEST_EXAMPLES") do
  Code.load_file("atbash.exs", __DIR__)
end

ExUnit.start
ExUnit.configure exclude: :pending, trace: true

defmodule AtbashTest do
  use ExUnit.Case

  # @tag :pending
  test "encode no" do
    assert Atbash.encode("no") == "ml"
  end

  @tag :pending
  test "encode yes" do
    assert Atbash.encode("yes") == "bvh"
  end

  @tag :pending
  test "encode OMG" do
    assert Atbash.encode("OMG") == "lnt"
  end

  @tag :pending
  test "encode O M G" do
    assert Atbash.encode("O M G") == "lnt"
  end

  @tag :pending
  test "encode long word" do
    assert Atbash.encode("mindblowingly") == "nrmwy oldrm tob"
  end

  @tag :pending
  test "encode numbers" do
    assert Atbash.encode("Testing, 1 2 3, testing.") == "gvhgr mt123 gvhgr mt"
  end

  @tag :pending
  test "encode sentence" do
    assert Atbash.encode("Truth is fiction.") == "gifgs rhurx grlm"
  end

  @tag :pending
  test "encode all the things" do
    plaintext = "The quick brown fox jumps over the lazy dog."
    cipher = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
    assert Atbash.encode(plaintext) == cipher
  end
end

Version data entries

178 entries across 178 versions & 1 rubygems

Version Path
trackler-2.1.0.23 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.22 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.21 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.20 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.19 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.18 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.17 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.16 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.15 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.14 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.13 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.12 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.11 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.10 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.9 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.8 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.7 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.6 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.5 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.1.0.4 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs