Commits

carl douglas committed b44176f

Added some more tests.

  • Participants
  • Parent commits 7f37301

Comments (0)

Files changed (1)

File tests/run.scm

 
 (define (test a b)
   (pp a)
-  (if (not (equal? a b))
-      (error (sprintf "Failed test: ~S != ~S" a b))))
+  (if (procedure? b)
+    (b a)
+    (if (not (equal? a b))
+      (error (sprintf "Failed test: ~S != ~S" a b)))))
 
 (redis-connect "127.0.0.1" 6379)
+
+(test (redis-write-command (*redis-out-port*) "ECHO" (list "Hello, World!"))
+      (lambda(x)#t))
+(test (redis-read-response (*redis-in-port*))
+      '("Hello, World!"))
+
+(test (redis-subscribe "test-channel")
+      '("1"))
+(test (redis-unsubscribe "test-channel")
+      '("0"))
+
 (test (redis-flushall)
       '("OK"))
 (test (redis-ping)