test.lisp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. (defpackage #:bcgreek-test
  2. (:use #:cl #:bcgreek))
  3. (in-package #:bcgreek-test)
  4. (defparameter *tests*
  5. '(("abgdezhqiklmncoprstufxywv" "αβγδεζηθικλμνξοπρστυφχψωϝ")
  6. ("ABGDEZHQIKLMNCOPRSTUFXYWv" "αβγδεζηθικλμνξοπρστυφχψωϝ")
  7. ("s" "ς")
  8. ("s " "ς ")
  9. ("sa" "σα")
  10. ("s1" "σ")
  11. ("s2" "ς")
  12. ("s3" "ϲ")
  13. ("a/" "ά")
  14. ("e\\" "ὲ")
  15. ("i=" "ῖ")
  16. ("o)" "ὀ")
  17. ("u(" "ὑ")
  18. ("h|" "ῃ")
  19. ("w)|=" "ᾦ")
  20. ("w|=)" "ᾦ")
  21. ("i+" "ϊ")
  22. ("a&" "ᾱ")
  23. ("a'" "ᾰ")
  24. ("r(r)" "ῥῤ")
  25. ("*a*b*g*d*e*z*h*q*i*k*l*m*n*c*o*p*r*s*t*u*f*x*y*w*v" "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩϜ")
  26. ("*)/a" "Ἄ")
  27. ("*/" "*/")
  28. ("*/p" "*/π")
  29. ("mh=nin a)/eide qea\\ *phlhi+a/dew *)axilh=os" "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος")
  30. )
  31. )
  32. (defun test ()
  33. (loop for (bc greek) in *tests*
  34. for decoded = (bcgreek-decode bc)
  35. do (assert (string= decoded greek))
  36. finally (return t)))