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.0.8.18 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.17 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.16 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.15 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.14 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.13 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.12 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.11 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.10 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.9 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.8 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.7 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.6 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.5 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.4 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.3 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.2 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.8.1 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.7.0 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs
trackler-2.0.6.44 tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs