Permalink
Browse files

got tests running again

  • Loading branch information...
bobbysmith007 committed Jul 22, 2011
1 parent 90bf18f commit 4850f8473a68338dcd4a23c330c44f509aa8be24
Showing with 20 additions and 12 deletions.
  1. +1 −1 cl-mediawiki.asd
  2. +16 −8 tests/query.lisp
  3. +3 −3 tests/setup.lisp
View
@@ -18,7 +18,7 @@
(:file "edit"))))
;; Additional Functionality will be loaded if cl-ppcre is in
;; the features list during compilation
- :depends-on (:cxml :drakma))
+ :depends-on (:cxml :drakma :alexandria))
(defsystem :cl-mediawiki-test
:description "A tool to help talk to mediawiki's api."
View
@@ -1,23 +1,31 @@
(in-package :cl-mediawiki-test)
(def-test-wikipedia get-content-test (query)
- (cl-mediawiki:get-page-content "Pigment"))
+ (assert-true
+ (cl-mediawiki:get-page-content "Pigment")))
(def-test-wikipedia get-action-tokens-test (query)
- (cl-mediawiki:get-action-tokens "Pigment"))
+ (assert-true
+ (cl-mediawiki:get-action-tokens "Pigment")))
(def-test-wikipedia pages-that-embed-test (query)
- (cl-mediawiki:pages-that-embed "Pigment")
- (cl-mediawiki:pages-that-embed "Template:Grateful_Dead" ))
+ (assert-false
+ (cl-mediawiki:pages-that-embed "Pigment"))
+ (assert-true
+ (cl-mediawiki:pages-that-embed "Template:Grateful_Dead" )))
(def-test-wikipedia get-page-info-test (query)
- (cl-mediawiki:get-page-info "Pigment" ))
+ (assert-true
+ (cl-mediawiki:get-page-info "Pigment" )))
(def-test-wikipedia recent-changes-test (query)
- (cl-mediawiki:recent-changes))
+ (assert-true
+ (cl-mediawiki:recent-changes)))
(def-test-wikipedia user-contribs-test (query)
- (cl-mediawiki:user-contribs "bobbysmith007"))
+ (assert-true
+ (cl-mediawiki:user-contribs "bobbysmith007")))
(def-test-wikipedia get-revisions-test (query)
- (cl-mediawiki:get-revisions "Pigment" :rvlimit 10))
+ (assert-true
+ (cl-mediawiki:get-revisions "Pigment" :rvlimit 10)))
View
@@ -34,7 +34,7 @@
(defmacro def-test (name (&rest args) &body body)
(loop for tag in args
do (setf (get tag :tests)
- (union (ensure-list (get tag :tests))
+ (union (alexandria:ensure-list (get tag :tests))
(list name))))
`(lisp-unit:define-test ,name
(progn
@@ -50,8 +50,8 @@
(defun run-tests (&key suites tests (use-debugger T))
(let* ((*package* (find-package :cl-mediawiki-test))
(lisp-unit::*use-debugger* use-debugger)
- (tests (append (ensure-list tests)
- (loop for suite in (ensure-list suites)
+ (tests (append (alexandria:ensure-list tests)
+ (loop for suite in (alexandria:ensure-list suites)
appending (get suite :tests))))
(out (with-output-to-string (*standard-output*)
(lisp-unit::run-test-thunks

0 comments on commit 4850f84

Please sign in to comment.