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.0.8.14 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.13 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.12 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.11 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.10 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.9 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.8 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.7 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.6 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.5 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.4 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.3 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.2 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.8.1 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.7.0 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.6.44 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.6.43 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.6.42 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.6.41 tracks/purescript/exercises/pangram/test/Main.purs
trackler-2.0.6.40 tracks/purescript/exercises/pangram/test/Main.purs