mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Init
This commit is contained in:
31
extra/rediscmd/rediscmd_test.go
Normal file
31
extra/rediscmd/rediscmd_test.go
Normal file
@ -0,0 +1,31 @@
|
||||
package rediscmd
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/bsm/ginkgo/v2"
|
||||
. "github.com/bsm/gomega"
|
||||
)
|
||||
|
||||
func TestGinkgo(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "redisext")
|
||||
}
|
||||
|
||||
var _ = Describe("AppendArg", func() {
|
||||
DescribeTable("...",
|
||||
func(src string, wanted string) {
|
||||
b := appendArg(nil, src)
|
||||
Expect(string(b)).To(Equal(wanted))
|
||||
},
|
||||
|
||||
Entry("", "-inf", "-inf"),
|
||||
Entry("", "+inf", "+inf"),
|
||||
Entry("", "foo.bar", "foo.bar"),
|
||||
Entry("", "foo:bar", "foo:bar"),
|
||||
Entry("", "foo{bar}", "foo{bar}"),
|
||||
Entry("", "foo-123_BAR", "foo-123_BAR"),
|
||||
Entry("", "foo\nbar", "666f6f0a626172"),
|
||||
Entry("", "\000", "00"),
|
||||
)
|
||||
})
|
Reference in New Issue
Block a user