summaryrefslogtreecommitdiff
path: root/spellcheck/spellcheck-test.scm
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-05-24 18:21:35 -0600
committerbd <bdunahu@operationnull.com>2024-05-24 18:21:35 -0600
commit6b40eb033d9c0bda4006f23426c34ef8fda4a0d5 (patch)
treef0efe82e05d27b4056be76baca258880a0698c98 /spellcheck/spellcheck-test.scm
parent5df534c4e3893a9f7a4f528746eca98d7a012736 (diff)
Add partial "mutate" implementation, failing tests
Diffstat (limited to 'spellcheck/spellcheck-test.scm')
-rw-r--r--spellcheck/spellcheck-test.scm29
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")