Nikhil Marathe avatar Nikhil Marathe committed 1daaa19

Added more test cases

Comments (0)

Files changed (1)

 (load "redis.lsp")
 (setf conn (redis))
+(if (nil? conn)
+  (throw-error "Could not connect to Redis!")
+  true)
 (assert-equals (:select conn 14) "OK")
 ;; If you have authentication enabled
 (assert-equals (:ping conn) "PONG")
 (assert-equals (:bgsave conn) "Background saving started")
-(assert (true? (:get conn "minestrone:song:8412c5ea08987a59ca7e1a9e0651cdb4af4bfe9f")))
+(println "Database size is " (:dbsize conn))
-(println "Database size is " (:dbsize conn))
+(println "Keys are " (:keys conn "*"))
+(println "Set abcd to 42 => " (:set conn "abcd" 42))
+(println "INCR abcd => " (:incr conn "abcd"))
+(println "INCRBY 5 => " (:incrby conn "abcd" 5))
+(dolist (x (:keys conn "*"))
+  (println x " --> " (:get conn x)))
 (:close conn)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.