13 lines
568 B
Plaintext
13 lines
568 B
Plaintext
// Test FuzzyJson
|
|
(load "FuzzyJson.kiss")
|
|
|
|
(loadFuzzyJson "dogs" "test/fuzzy.json")
|
|
(loadFuzzyJson "dogs" "test/fuzzy2.json")
|
|
|
|
(assert (= "is a very good dog" (getFuzzyJson "dogs" "Albort")))
|
|
// takeFuzzyJson removes the match to make following fuzzyJson retrievals save time:
|
|
(assert (= "is a very good dog" (takeFuzzyJson "dogs" "Albort")))
|
|
// No good match will cause crash at compile time:
|
|
(assertThrowsAtCompileTime (getFuzzyJson "dogs" "Albort"))
|
|
// duplicate definitions throw an error at compile time:
|
|
(assertThrowsAtCompileTime (getFuzzyJson "dogs" "Rangie")) |