Skip to content

Commit

Permalink
Swap result vs. expected
Browse files Browse the repository at this point in the history
  • Loading branch information
BNAndras committed Apr 22, 2024
1 parent 69ed155 commit 9fceafe
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions exercises/practice/acronym/acronym-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,46 @@


(ert-deftest basic ()
(should (string= "PNG" (acronym "Portable Network Graphics"))))
(should (string= (acronym "Portable Network Graphics")
"PNG")))


(ert-deftest lowercase-words ()
(should (string= "ROR" (acronym "Ruby on Rails"))))
(should (string= (acronym "Ruby on Rails")
"ROR")))


(ert-deftest punctuation ()
(should (string= "FIFO" (acronym "First In, First Out"))))
(should (string= (acronym "First In, First Out")
"FIFO")))


(ert-deftest all-caps-word ()
(should (string= "GIMP" (acronym "GNU Image Manipulation Program"))))
(should (string= (acronym "GNU Image Manipulation Program")
"GIMP")))


(ert-deftest punctuation-without-white-space ()
(should (string= "CMOS" (acronym "Complementary metal-oxide semiconductor"))))
(should (string= (acronym "Complementary metal-oxide semiconductor")
"CMOS")))


(ert-deftest very-long-abbreviation ()
(should (string= "ROTFLSHTMDCOALM"
(acronym "Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me"))))
(should (string= (acronym "Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me")
"ROTFLSHTMDCOALM")))


(ert-deftest consecutive-delimiters ()
(should (string= "SIMUFTA" (acronym "Something - I made up from thin air"))))
(should (string= (acronym "Something - I made up from thin air")
"SIMUFTA")))


(ert-deftest apostrophes ()
(should (string= "HC" (acronym "Halley's Comet"))))
(should (string= (acronym "Halley's Comet") "HC")))


(ert-deftest underscore-emphasis ()
(should (string= "TRNT" (acronym "The Road _Not_ Taken"))))
(should (string= (acronym "The Road _Not_ Taken") "TRNT")))


(provide 'acronym-test)
Expand Down

0 comments on commit 9fceafe

Please sign in to comment.