Sha256: ab0fa57cd8dbc62729e2f027de078d7fbd25c6eab7a9d9da8e55a37a98bff2b2

Contents?: true

Size: 1.02 KB

Versions: 69

Compression:

Stored size: 1.02 KB

Contents

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

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

defmodule CryptoSquareTest do
  use ExUnit.Case

  # @tag :pending
  test "empty string" do
    assert CryptoSquare.encode("") == ""
  end

  @tag :pending
  test "perfect square" do
    assert CryptoSquare.encode("abcd") == "ac bd"
  end

  @tag :pending
  test "uppercase string" do
    assert CryptoSquare.encode("ABCD") == "ac bd"
  end

  @tag :pending
  test "small imperfect square" do
    assert CryptoSquare.encode("This is easy") == "tis hsy ie sa"
  end

  @tag :pending
  test "punctuation and numbers" do
    assert CryptoSquare.encode("1, 2, 3, Go! Go, for God's sake!") == "1gga 2ook 3fde gos ors"
  end

  @tag :pending
  test "long string" do
    msg = "If man was meant to stay on the ground, god would have given us roots."
    cipher = "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau"
    assert CryptoSquare.encode(msg) == cipher
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.118 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.117 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.116 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.115 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.114 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.113 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.111 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.110 tracks/elixir/exercises/crypto-square/crypto_square_test.exs