Sha256: 14da4e0ff9b537bf82a762ff882b888e5ebcd2affc9af44d1c0ea2610584ffdf

Contents?: true

Size: 1.38 KB

Versions: 223

Compression:

Stored size: 1.38 KB

Contents

module Test.Main where

import Prelude
import Test.Unit (suite, test)
import Test.Unit.Main (runTest)
import Test.Unit.Assert as Assert
import Pangram (isPangram)


main = runTest do
  suite "Pangram.isPangram" do
    test "sentence empty" do
      Assert.equal false $
        isPangram ""

    test "pangram with only lower case" do
      Assert.equal true $
        isPangram "the quick brown fox jumps over the lazy dog"

    test "missing character 'x'" do
      Assert.equal false $
        isPangram "a quick movement of the enemy will jeopardize five gunboats"

    test "another missing character 'x'" do
      Assert.equal false $
        isPangram "the quick brown fish jumps over the lazy dog"

    test "pangram with underscores" do
      Assert.equal true $
        isPangram "the_quick_brown_fox_jumps_over_the_lazy_dog"

    test "pangram with numbers" do
      Assert.equal true $
        isPangram "the 1 quick brown fox jumps over the 2 lazy dogs"

    test "missing letters replaced by numbers" do
      Assert.equal false $
        isPangram "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"

    test "pangram with mixed case and punctuation" do
      Assert.equal true $
        isPangram "\"Five quacking Zephyrs jolt my wax bed.\""

    test "pangram with non ascii characters" do
      Assert.equal true $
        isPangram "Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich."

Version data entries

223 entries across 223 versions & 1 rubygems

Version Path
trackler-2.2.1.37 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.36 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.35 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.34 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.33 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.32 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.31 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.30 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.29 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.28 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.27 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.26 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.25 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.24 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.23 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.22 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.21 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.20 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.19 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.18 tracks/purescript/exercises/pangram/test/Main.purs