diff options
Diffstat (limited to 'spellcheck/spellcheck-test.scm')
-rw-r--r-- | spellcheck/spellcheck-test.scm | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/spellcheck/spellcheck-test.scm b/spellcheck/spellcheck-test.scm index 8030c41..438384d 100644 --- a/spellcheck/spellcheck-test.scm +++ b/spellcheck/spellcheck-test.scm @@ -1,5 +1,6 @@ (use-modules (srfi srfi-64) - (hasher dictionary)) + (dictionary) + (mutate)) (define simple-dict (create-dictionary '("word"))) (define complex-dict (create-dictionary '("Again" "the" "thirst" @@ -11,7 +12,7 @@ "heart" "of" "the" "snake" "across" "the" "fire"))) -(test-begin "harness") +(test-begin "dictionary") (test-assert "create-dictionary returns hashtable" @@ -54,4 +55,26 @@ (dict-values-ref complex-dict)) -(test-end "harness") +(test-end "dictionary") + +(test-begin "mutate") + + +(test-equal "test deletes six" + '("ix" "sx" "si") + (deletes "six")) + +(test-equal "test transposes" + '("isx" "sxi") + (transposes "six")) + +(test-equal "test replaces" + '("aix" "bix" "cix" "dix" "eix" "fix" "gix" "hix" "iix" "jix" "kix" "lix" "mix" "nix" "oix" "pix" "qix" "rix" "six" "tix" "uix" "vix" "wix" "xix" "yix" "zix" "sax" "sbx" "scx" "sdx" "sex" "sfx" "sgx" "shx" "six" "sjx" "skx" "slx" "smx" "snx" "sox" "spx" "sqx" "srx" "ssx" "stx" "sux" "svx" "swx" "sxx" "syx" "szx" "sia" "sib" "sic" "sid" "sie" "sif" "sig" "sih" "sii" "sij" "sik" "sil" "sim" "sin" "sio" "sip" "siq" "sir" "sis" "sit" "siu" "siv" "siw" "six" "siy" "siz") + (replaces "six")) + +(test-equal "test inserts" + '("asix" "bsix" "csix" "dsix" "esix" "fsix" "gsix" "hsix" "isix" "jsix" "ksix" "lsix" "msix" "nsix" "osix" "psix" "qsix" "rsix" "ssix" "tsix" "usix" "vsix" "wsix" "xsix" "ysix" "zsix" "saix" "sbix" "scix" "sdix" "seix" "sfix" "sgix" "shix" "siix" "sjix" "skix" "slix" "smix" "snix" "soix" "spix" "sqix" "srix" "ssix" "stix" "suix" "svix" "swix" "sxix" "syix" "szix" "siax" "sibx" "sicx" "sidx" "siex" "sifx" "sigx" "sihx" "siix" "sijx" "sikx" "silx" "simx" "sinx" "siox" "sipx" "siqx" "sirx" "sisx" "sitx" "siux" "sivx" "siwx" "sixx" "siyx" "sizx" "sixa" "sixb" "sixc" "sixd" "sixe" "sixf" "sixg" "sixh" "sixi" "sixj" "sixk" "sixl" "sixm" "sixn" "sixo" "sixp" "sixq" "sixr" "sixs" "sixt" "sixu" "sixv" "sixw" "sixx" "sixy" "sixz") + (inserts "six")) + + +(test-end "mutate") |