(use posix mw-core testeez sxpath) (default-wiki "http://en.wikipedia.org/w/api.php") (testeez "mw-core" (test/equal "Raw XML response from Wikipedia" (let* ((response (raw-api-call '((action . query)(meta . siteinfo)(format . xml)))) (len (string-length response))) (string-append (substring response 0 33) (substring response (- len 14)))) "") (test/equal "Raw json response from Wikipedia" (let* ((response (raw-api-call '((action . query)(meta . siteinfo)(format . json)))) (len (string-length response))) (substring response 0 32)) "{\"query\":{\"general\":{\"mainpage\":") (test/equal "pipejoin" (pipejoin '(a "b" "c d" 12)) "a|b|c d|12") (test/equal "sx-call sanity check" (let* ((response (sx-call '((action . query)(meta . siteinfo))))) (map (sxpath "api/query/general/@wikiid") response)) '(((wikiid "enwiki")))) )