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.1.0.40 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.39 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.38 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.37 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.36 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.34 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.33 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.32 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.31 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.30 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.29 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.28 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.27 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.26 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.25 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.24 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.23 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.22 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.21 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.1.0.20 tracks/purescript/exercises/acronym/test/Main.purs