Sha256: df1e9dd49a6a02225195382d65a2cfafd9b847961c02135f33d85de90e3b9ab3
Contents?: true
Size: 1.75 KB
Versions: 141
Compression:
Stored size: 1.75 KB
Contents
module Test.Main where import Prelude import Control.Monad.Eff (Eff) import Control.Monad.Eff.AVar (AVAR) import Control.Monad.Eff.Console (CONSOLE) import Test.Unit (TestSuite, suite, test) import Test.Unit.Console (TESTOUTPUT) import Test.Unit.Main (runTest) import Test.Unit.Assert as Assert import Pangram (isPangram) main :: forall eff . Eff ( avar :: AVAR , console :: CONSOLE , testOutput :: TESTOUTPUT | eff ) Unit main = runTest suites suites :: forall e. TestSuite e suites = 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
141 entries across 141 versions & 1 rubygems