Plaster

text
CL-USER> (radiance-test:run-test) ? RADIANCE-TEST::RADIANCE ? RADIANCE-TEST::TOOLKIT 0.000 ✔ (is = 0 (universal-to-unix-time (encode-universal-time 0 0 0 1 1 1970 0))) 0.000 ✔ (is = (encode-universal-time 0 0 0 1 1 1970 0) (unix-to-universal-time 0)) 0.000 ✔ (is equal "0 seconds" (format-relative-time 0)) 0.000 ✔ (is equal "1 second" (format-relative-time 1)) 0.000 ✔ (is equal "1 minute, 1 second" (format-relative-time 61)) 0.000 ✔ (is equal "0:00:00" (format-clock-time 0)) 0.000 ✔ (is equal "0:01:01" (format-clock-time 61)) 0.000 ✔ (is equal "1900-01-01T00:00:00" (format-machine-date 0)) 0.000 ✔ (is equal "1900.01.01 00:00:00" (format-human-date 0)) 0.000 ✔ (is equal "Monday, 1st of January 1900, 0:00:00 UTC" (format-fancy-date 0)) 0.000 ✔ (is = 16 (length (make-random-string))) 0.000 ✔ (is = 12 (length (make-random-string 12))) 0.000 ✔ (is equal "aaaaaa" (make-random-string 6 "a")) 0.000 ✔ (is equal (make-random-string 16) (make-random-string 16)) 0.000 ✔ (is = 1 (file-size p)) 0.000 ✔ (is eq pathname (resolve-base pathname)) 0.000 ✔ (fail (resolve-base '%foobar-package) error) 0.000 ✔ (is pathname~= (system-source-directory :radiance-test) (resolve-base ())) 0.000 ✔ (is pathname~= (system-source-directory :radiance) (resolve-base :radiance-core)) 0.000 ✔ (is pathname~= (system-source-directory :radiance) (resolve-base :radiance)) 0.000 ✔ (is pathname~= (system-relative-pathname :radiance "static/foo") (static-file "foo" :radiance)) 0.001 ✔ (is pathname~= (system-relative-pathname :radiance-test "static/foo") (@static "foo")) 0.000 ✔ (is pathname~= (system-relative-pathname :radiance "template/foo") (template-file "foo" :radiance)) 0.000 ✔ (is pathname~= (system-relative-pathname :radiance-test "template/foo") (@template "foo")) 0.000 ✔ (is = 1 (or* 1 2 3)) 0.000 ✔ (is = 1 (or* () 1 2 3)) 0.000 ✔ (is = 1 (or* () "" 1 2 3)) 0.000 ✔ (is equal "1" (or* "" "1" "2" "3")) 0.000 ✔ (is = 1 (or* (incf a) (incf a))) 0.000 ✔ (is equal '(a b c) (perm a b c)) 0.000 ✔ (is equal "foo" (pathname-name (parse-path-safely "foo"))) 0.000 ✔ (is equal "foo" (pathname-name (parse-path-safely "foo.bar"))) 0.000 ✔ (is equal "bar" (pathname-type (parse-path-safely "foo.bar"))) 0.000 ✔ (is equal "foo" (pathname-name (parse-path-safely "baz/foo.bar"))) 0.000 ✔ (is equal "bar" (pathname-type (parse-path-safely "baz/foo.bar"))) 0.000 ✔ (is equal "baz" (second (pathname-directory (parse-path-safely "baz/foo.bar")))) 0.000 ✔ (is eql :relative (first (pathname-directory (parse-path-safely "baz/foo.bar")))) 0.000 ✔ (is eql :relative (first (pathname-directory (parse-path-safely "/baz/foo.bar")))) 0.000 ✔ (is = 2 (length (pathname-directory (parse-path-safely "baz/foo.bar")))) 0.000 ✔ (is = 2 (length (pathname-directory (parse-path-safely "baz//foo.bar")))) 0.000 ✔ (is = 3 (length (pathname-directory (parse-path-safely "baz/foo/bar")))) 0.001 ✔ (is equal "a" (url-encode "a")) 0.000 ✔ (is equal "%25" (url-encode "%")) 0.000 ✔ (is equal "%" (url-encode "%" :allowed "%")) 0.000 ✔ (is equal "%E5%A4%9C" (url-encode "夜" :external-format :utf-8)) 0.000 ✔ (is equal "%FF%FE%1CY" (url-encode "夜" :external-format :utf-16)) 0.000 ✔ (fail (url-encode "夜" :external-format :ascii) error) 0.434 ✔ RADIANCE-TEST::TOOLKIT ? RADIANCE-TEST::INTERFACES ? RADIANCE-TEST::CACHE 0.000 ✔ (is eq () (get 'cache-name-1)) 0.000 ✔ (is equalp cached-value (get 'cache-name-1)) 0.000 ✔ (is eq () (get 'cache-name-1)) 0.015 ✔ RADIANCE-TEST::CACHE ? RADIANCE-TEST::BAN 0.000 ✔ (is eq () (list)) 0.000 ✔ (is eql t (jail-time "127.0.0.1")) 0.000 ✔ (is eql t (jail-time "127.0.0.2")) 0.000 ✔ (is eql end-time (jail-time "127.0.0.3")) 0.000 ✔ (is = 3 (length (list))) 0.000 ✔ (is eq () (jail-time "127.0.0.2")) 0.000 ✔ (is = 2 (length (list))) 0.000 ✔ (is eql t (jail-time "127.0.0.2")) 0.000 ✔ (is = 3 (length (list))) 0.000 ✔ (is eq () (list)) 0.165 ✔ RADIANCE-TEST::BAN ? RADIANCE-TEST::DATABASE ? RADIANCE-TEST::CONNECTION 0.000 ✔ (fail (connect "this-db-should-not-exist") 'connection-failed) WARNING: Condition of type DATABASE:CONNECTION-ALREADY-OPEN. 0.287 ✔ (finish (connect "test")) 0.000 ✔ (fail (connect "test") 'connection-already-open) 0.000 ✔ (true (connected-p)) 0.000 ✔ (finish (disconnect)) 0.317 ✔ RADIANCE-TEST::CONNECTION ? RADIANCE-TEST::COLLECTION 0.000 ✔ (is equal () (collections)) 0.000 ✔ (false (collection-exists-p "test")) 0.000 ✔ (fail (create ":" ()) 'invalid-collection) 0.000 ✔ (fail (create "test" '((: :int))) 'invalid-field) 0.000 ✔ (fail (create "test" '((foo :foo))) 'invalid-field) 0.058 ✔ (true (create "test" '((id :id) (integer :integer) (integer1 (:integer 1)) (integer2 (:integer 2)) (integer3 (:integer 3)) (integer4 (:integer 4)) (integer5 (:integer 5)) (integer6 (:integer 6)) (integer7 (:integer 7)) (integer8 (:integer 8)) (float :float) (varchar (:varchar 32)) (text :text)))) 0.000 ✔ (false (create "test" '())) 0.001 ✔ (true (collection-exists-p "test")) 0.000 ✔ (fail (create "test" '() :if-exists :error) 'collection-already-exists) 0.000 ✔ (is equal '("test") (collections)) 0.000 ✔ (true (structure "test")) 0.037 ✔ (finish (drop "test")) 0.000 ✔ (false (collection-exists-p "test")) 0.000 ✔ (fail (drop "test") 'invalid-collection) 0.001 ✔ (is equal () (collections)) 0.337 ✔ RADIANCE-TEST::COLLECTION ? RADIANCE-TEST::RECORD 0.033 ✔ (of-type id (insert "test" '((number . 0) (name . "Guybrush") (text . "Can hold his breath for ten minutes.")))) 0.000 ✔ (is = 1 (count "test" (query :all))) 0.000 ✔ (is = 2 (count "test" (query :all))) 0.000 ✔ (of-type id (ensure-id (princ-to-string id))) 0.035 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.025 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.020 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.026 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.027 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.023 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.026 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.030 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.037 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.026 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.000 ✔ (is = 12 (count "test" (query :all))) 0.000 ✔ (is = 10 (count "test" (query (:= 'name "Tester")))) 0.000 ✔ (is = 7 (count "test" (query (:< 'number 5)))) 0.072 ✔ (finish (empty "test")) 0.000 ✔ (is = 0 (count "test" (query :all))) 0.033 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.026 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.024 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.021 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.041 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.022 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.023 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.022 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.022 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.023 ✔ (of-type id (insert "test" (quasiquote ((number . ,i) (name . "Tester"))))) 0.000 ✔ (is = 10 (count "test" (query :all))) 0.033 ✔ (finish (remove "test" (query (:= 'number 5)))) 0.000 ✔ (is = 9 (count "test" (query :all))) 0.001 ✔ (is = 0 (count "test" (query (:= 'number 5)))) 0.044 ✔ (finish (update "test" (query (:= 'number 9)) '((number . 5)))) 0.001 ✔ (is = 9 (count "test" (query :all))) 0.000 ✔ (is = 1 (count "test" (query (:= 'number 5)))) 0.001 ✔ (is = 9 (length (select "test" (query :all)))) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (is = i (gethash "number" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (of-type (integer 0 8) (gethash "number" record)) 0.000 ✔ (is equal "Tester" (gethash "name" record)) 0.000 ✔ (false (gethash "text" record)) 0.000 ✔ (is equal (loop repeat 9 collect "Tester") (iterate "test" (query :all) (lambda (r) (gethash "name" r)) :accumulate t)) 0.000 ✔ (is = (loop for i from 0 below 9 sum i) (reduce (function +) (iterate "test" (query :all) (lambda (r) (gethash "number" r)) :accumulate t))) 0.038 ✔ (finish (update "test" (query (:< 'number 5)) '(("name" . "retseT")))) 0.000 ✔ (is = 5 (count "test" (query (:= 'name "retseT")))) 0.030 ✔ (finish (remove "test" (query (:= 'name "retseT")) :amount 2)) 0.000 ✔ (is = 3 (count "test" (query (:= 'name "retseT")))) 0.000 ✔ (is = 1 (gethash "number" (first (select "test" (query (:= '_id id)))))) 0.000 ✔ (is equal "foo" (gethash "name" (first (select "test" (query (:= '_id id)))))) 0.000 ✔ (is equal "bar" (gethash "text" (first (select "test" (query (:= '_id id)))))) 1.627 ✔ RADIANCE-TEST::RECORD ? RADIANCE-TEST::BENCHMARK 16.198 ✔ (finish (dotimes (i 1000) (insert "test" '((number . 0))))) 0.000 ✔ (finish (count "test" (query :all))) 0.000 ✔ (finish (select "test" (query (:= 'number 1)))) 0.039 ✔ (finish (remove "test" (query :all) :amount 500)) 16.534 ✔ RADIANCE-TEST::BENCHMARK ? RADIANCE-TEST::TRANSACTIONS 0.008 ✔ (finish (with-transaction () (insert "test" '((number . 0))))) 0.000 ✔ (is = 1 (count "test" (query :all))) 0.000 ✔ (fail (with-transaction () (insert "test" '((number . 1))) (error "Exit transaction")) error) 0.001 ✔ (is = 1 (count "test" (query :all))) 0.262 ✔ RADIANCE-TEST::TRANSACTIONS 19.079 ✔ RADIANCE-TEST::DATABASE 19.260 ✔ RADIANCE-TEST::INTERFACES 19.707 ✔ RADIANCE-TEST::RADIANCE ;; Summary: Passed: 188 Failed: 0 Skipped: 0