Sha256: 3fb628a7ec81110264f69e8def0505171623ecafa9e47e5480e264df629ab1d6

Contents?: true

Size: 890 Bytes

Versions: 214

Compression:

Stored size: 890 Bytes

Contents

module Test.Main where

import Prelude
import Test.Unit.Assert as Assert
import Acronym (abbreviate)
import Control.Monad.Eff (Eff)
import Test.Unit (suite, test)
import Test.Unit.Main (runTest)


main :: Eff _ Unit
main = runTest do
  suite "Acronym.abbreviate" do
    test "acronyms from title case" $
      Assert.equal
        "PNG" $
        abbreviate "Portable Networks Graphic"

    test "acronyms from lower case" $
      Assert.equal
        "ROR" $
        abbreviate "Ruby on Rails"

    test "acronyms from inconsistent case" $
      Assert.equal
        "HTML" $
        abbreviate "HyperText Markup Language"

    test "punctuation is ignored" $
      Assert.equal
        "FIFO" $
        abbreviate "First in, First out"

    test "acronyms ignoring punctuation and casing" $
      Assert.equal
        "CMOS" $
        abbreviate "Complementary Metal-Oxide semiconductor"

Version data entries

214 entries across 214 versions & 1 rubygems

Version Path
trackler-2.0.8.55 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.54 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.53 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.52 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.51 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.50 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.49 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.48 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.47 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.46 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.45 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.44 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.43 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.42 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.41 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.40 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.39 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.38 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.37 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.0.8.36 tracks/purescript/exercises/acronym/test/Main.purs