File tree 1 file changed +13
-11
lines changed
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 1
1
# # Initial version by Iñaki Ucar using Redux
2
2
# # Adapted to RcppRedis by Dirk Eddelbuettel
3
3
4
- # # -- quick test
5
- # # redis <- new(Redis)
6
- # # redis$lpush("foo", "banana")
7
- # # redis$lpush("foo", "banana")
8
- # # ##redis$lpop("foo")
9
- # # ##redis$lpop("foo")
10
- # # redis$lrem("foo", 1, "banana") # not removed
11
- # # redis$lpop("foo")
12
- # # redis$lpop("foo")
13
- # # q()
14
-
15
4
useRcppRedis <- function () {
16
5
17
6
ensure_queue <- function (name ) {
@@ -140,5 +129,18 @@ useRedux <- function() {
140
129
141
130
}
142
131
132
+ quickCheck <- function () {
133
+ redis <- new(RcppRedis :: Redis )
134
+ redis $ lpush(" foo" , " banana" )
135
+ redis $ lpush(" foo" , " banana" )
136
+ print(str(redis $ lrange(" foo" , 0 , - 1 )))
137
+ redis $ lrem(" foo" , 1 , " banana" )
138
+ print(str(redis $ lrange(" foo" , 0 , - 1 )))
139
+ redis $ lpop(" foo" )
140
+ print(str(redis $ lrange(" foo" , 0 , - 1 )))
141
+ invisible (NULL )
142
+ }
143
+
143
144
useRcppRedis()
144
145
# useRedux()
146
+ # quickCheck()
You can’t perform that action at this time.
0 commit comments