Added with-bucket, cleaned it up a bit.

This commit is contained in:
2011-08-02 21:33:51 -07:00
parent 6ecbeddc0f
commit e8d1cea8ba
2 changed files with 52 additions and 17 deletions

View File

@@ -15,9 +15,15 @@
(test "Bucket Exists 2" #t (bucket-exists? *b*))
(test-assert "List Buckets" (list-buckets)) ; should test this more specifically...
(test "List Bucket Objects 1" '() (list-objects *b*))
(test-assert "Put Object" (put-object! *b* "key" "value"))
(test-assert "Put Object" (put-object! *b* "key" (lambda () "value") (string-length "value") "text/plain"))
(test "List Bucket Objects 2" '("key") (list-objects *b*))
(test-assert "Delete Object" (delete-object! *b* "key"))
(test-assert "Put String" (put-string! *b* "string" "res-string"))
(test "Get String" "res-string" (get-string *b* "string"))
(test-assert "Delete Object 2" (delete-object! *b* "string"))
(test-assert "Put Sexp" (put-sexp! *b* "sexp" '(+ 1 2 3)))
(test "Get Sexp" 6 (eval (get-sexp *b* "sexp")))
(test-assert "Delete Object 3" (delete-object! *b* "sexp"))
(test-assert "Delete Bucket" (delete-bucket! *b*)))
(test-exit)