|
15 | 15 | ;; Define and enter a new FiveAM test-suite
|
16 | 16 | (def-suite* acronym-suite)
|
17 | 17 |
|
18 |
| -(test empty-gives-empty (is (equal "" (acronym:acronym "")))) |
| 18 | +(test basic |
| 19 | + (let ((phrase "Portable Network Graphics")) |
| 20 | + (is (string= "PNG" (acronym:acronym phrase))))) |
19 | 21 |
|
20 |
| -(test png-test (is (equal "PNG" (acronym:acronym "Portable Network Graphics")))) |
| 22 | +(test lowercase-words |
| 23 | + (let ((phrase "Ruby on Rails")) |
| 24 | + (is (string= "ROR" (acronym:acronym phrase))))) |
21 | 25 |
|
22 |
| -(test ror-test (is (equal "ROR" (acronym:acronym "Ruby on Rails")))) |
| 26 | +(test punctuation |
| 27 | + (let ((phrase "First In, First Out")) |
| 28 | + (is (string= "FIFO" (acronym:acronym phrase))))) |
23 | 29 |
|
24 |
| -(test fifo-test (is (equal "FIFO" (acronym:acronym "First In, First Out")))) |
| 30 | +(test all-caps-word |
| 31 | + (let ((phrase "GNU Image Manipulation Program")) |
| 32 | + (is (string= "GIMP" (acronym:acronym phrase))))) |
25 | 33 |
|
26 |
| -(test php-test |
27 |
| - (is (equal "PHP" (acronym:acronym "PHP: Hypertext Preprocessor")))) |
| 34 | +(test punctuation-without-whitespace |
| 35 | + (let ((phrase "Complementary metal-oxide semiconductor")) |
| 36 | + (is (string= "CMOS" (acronym:acronym phrase))))) |
28 | 37 |
|
29 |
| -(test cmos-test |
30 |
| - (is |
31 |
| - (equal "CMOS" (acronym:acronym "Complementary metal-oxide semiconductor")))) |
| 38 | +(test very-long-abbreviation |
| 39 | + (let ((phrase "Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me")) |
| 40 | + (is (string= "ROTFLSHTMDCOALM" (acronym:acronym phrase))))) |
| 41 | + |
| 42 | +(test consecutive-delimiters |
| 43 | + (let ((phrase "Something - I made up from thin air")) |
| 44 | + (is (string= "SIMUFTA" (acronym:acronym phrase))))) |
| 45 | + |
| 46 | +(test apostrophes |
| 47 | + (let ((phrase "Halley's Comet")) |
| 48 | + (is (string= "HC" (acronym:acronym phrase))))) |
| 49 | + |
| 50 | +(test underscore-emphasis |
| 51 | + (let ((phrase "The Road _Not_ Taken")) |
| 52 | + (is (string= "TRNT" (acronym:acronym phrase))))) |
32 | 53 |
|
33 | 54 | (defun run-tests (&optional (test-or-suite 'acronym-suite))
|
34 | 55 | "Provides human readable results of test run. Default to entire suite."
|
|
0 commit comments