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.17 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.16 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.15 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.14 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.13 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.12 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.11 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.10 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.9 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.8 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.7 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.6 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.5 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.4 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.3 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.2 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.1 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.1.0 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.0.6 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.2.0.5 tracks/purescript/exercises/pangram/test/Main.purs