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.2.1.37 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.36 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.35 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.34 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.33 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.32 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.31 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.30 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.29 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.28 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.27 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.26 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.25 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.24 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.23 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.22 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.21 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.20 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.19 tracks/purescript/exercises/acronym/test/Main.purs
trackler-2.2.1.18 tracks/purescript/exercises/acronym/test/Main.purs