Skip to content

Commit

Permalink
Added a few more tests, Quicklisp link, and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EuAndreh committed Sep 11, 2014
1 parent 0ce4dac commit f54a71a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -3,11 +3,11 @@ CL-Inflector

A common lisp library to easily pluralize and singularize English words.

This is a port of the ruby ActiveSupport Inflector module
This is a port of the ruby ActiveSupport Inflector module.

Installation
------------------
Just use quicklisp:
Just use [Quicklisp](www.quicklisp.org):
> (ql:quickload 'cl-inflector)

Usage
Expand Down
6 changes: 3 additions & 3 deletions cl-inflector.asd
Expand Up @@ -8,17 +8,17 @@
(in-package :cl-inflector.system)

(defsystem :cl-inflector
:description "Functions to pluralize and singularize english languages words"
:description "Functions to pluralize and singularize english and portuguese languages words"
:licence "MIT"
:version "0.2"
:components ((:file "langs")
(:file "inflector"))
:depends-on (:cl-ppcre :alexandria))

(defsystem :cl-inflector-test
:description "Functions to pluralize and singularize english languages words"
:description "Functions to pluralize and singularize english and portuguese languages words"
:licence "MIT"
:version "0.1"
:version "0.2"
:components ((:module :tests
:serial t
:components ((:file "inflector"))))
Expand Down
2 changes: 0 additions & 2 deletions langs.lisp
Expand Up @@ -167,5 +167,3 @@ Defaults to en_US.")

(defun curr-lang ()
*curr-lang*)

;; with-lang
9 changes: 6 additions & 3 deletions tests/inflector.lisp
Expand Up @@ -4,7 +4,6 @@
:lisp-unit2))
(in-package :cl-inflector-test)


(define-test test-plural-of-regular-en-us ()
(set-lang! :en_US)
(loop for word in (list "quiz" "buzz" "fez" "whiz" "wiz" "wolf" "wife")
Expand Down Expand Up @@ -102,5 +101,9 @@
(assert-equal "doodles" (plural-of "dood"))
(set-lang! :pt_BR)
(assert-equal "doods" (plural-of "dood"))
(uncountable "dood")
(assert-equal "dood" (plural-of "dood")))
(irregular "dood" "doodes")
(assert-equal "doodes" (plural-of "dood"))
(set-lang! :en_US)
(assert-equal "doods" (plural-of "dood"))
(set-lang! :pt_BR)
(assert-equal "doods" (plural-of "dood")))

0 comments on commit f54a71a

Please sign in to comment.