summaryrefslogtreecommitdiff
path: root/queue/zset/add.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-12-18 15:59:03 +0200
committerSteve Kemp <steve@steve.org.uk>2015-12-18 15:59:03 +0200
commit2db7fba4d74b663da16625a990f7b7624842712a (patch)
tree0de4b3f3c3139cccfa36342a5e697b14a32f4e2d /queue/zset/add.rb
parent43d6c5affc78755f8a45b242d8d39acc72bd3526 (diff)
Added queue-demonstration programs.
Diffstat (limited to 'queue/zset/add.rb')
-rwxr-xr-xqueue/zset/add.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/queue/zset/add.rb b/queue/zset/add.rb
new file mode 100755
index 0000000..cd63503
--- /dev/null
+++ b/queue/zset/add.rb
@@ -0,0 +1,22 @@
+#!/usr/bin/ruby
+#
+# Add the same three tests over and over again.
+#
+#
+require "redis"
+
+@redis = Redis.new(:host => "127.0.0.1")
+
+
+x = []
+
+x.push( "http://example.com/ must run http otherwise 'fail'" )
+x.push( "1.2.3.4 must run ping otherwise 'fail'" )
+x.push( "https://steve.net/ must run https otherwise 'fail'" )
+
+
+for i in 0 .. 10
+ x.each do |test|
+ @redis.zadd('zset', Time.now.to_i, test)
+ end
+end