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.180 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.179 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.178 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.177 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.176 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.175 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.174 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.173 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.172 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.171 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.170 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.169 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.167 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.166 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.165 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.164 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.163 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.162 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.161 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.160 tracks/elixir/exercises/crypto-square/crypto_square_test.exs