1
exercism fetch common-lisp acronym

acronym-test.lisp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(ql:quickload "lisp-unit")
#-xlisp-test (load "acronym")

(defpackage #:acronym-test
  (:use #:common-lisp #:lisp-unit))

(in-package #:acronym-test)


(define-test empty-gives-empty
  (assert-equal
    ""
    (acronym:acronym "")))

(define-test png-test
  (assert-equal
    "PNG"
    (acronym:acronym "Portable Network Graphics")))

(define-test ror-test
  (assert-equal
    "ROR"
    (acronym:acronym "Ruby on Rails")))

(define-test html-test
  (assert-equal
    "HTML"
    (acronym:acronym "HyperText Markup Language")))

(define-test fifo-test
  (assert-equal
    "FIFO"
    (acronym:acronym "First In, First Out")))

(define-test php-test
  (assert-equal
    "PHP"
    (acronym:acronym "PHP: Hypertext Preprocessor")))

(define-test cmos-test
  (assert-equal
    "CMOS"
    (acronym:acronym "Complementary metal-oxide semiconductor")))

#-xlisp-test
(let ((*print-errors* t)
      (*print-failures* t))
  (run-tests :all :acronym-test))