Skip to content

Commit

Permalink
space -> tab
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-binbin committed Jan 25, 2024
1 parent 16f8e96 commit 51f4b7e
Showing 1 changed file with 107 additions and 107 deletions.
214 changes: 107 additions & 107 deletions tests/gocase/unit/command/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,111 +66,111 @@ func TestCommand(t *testing.T) {
require.Equal(t, "test", vs[0])
})

t.Run("COMMAND GETKEYS SINTERCARD", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "SINTERCARD", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZINTER", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZINTER", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZINTERSTORE", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZINTERSTORE", "dst", "2", "src1", "src2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "src1", vs[0])
require.Equal(t, "src2", vs[1])
})

t.Run("COMMAND GETKEYS ZINTERCARD", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZINTERCARD", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZUNION", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZUNION", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZUNIONSTORE", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZUNIONSTORE", "dst", "2", "src1", "src2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "src1", vs[0])
require.Equal(t, "src2", vs[1])
})

t.Run("COMMAND GETKEYS ZDIFF", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZDIFF", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZDIFFSTORE", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZDIFFSTORE", "dst", "2", "src1", "src2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "src1", vs[0])
require.Equal(t, "src2", vs[1])
})

t.Run("COMMAND GETKEYS ZMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZMPOP", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS BZMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "BZMPOP", "0", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS LMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "LMPOP", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS BLMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "BLMPOP", "0", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})
t.Run("COMMAND GETKEYS SINTERCARD", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "SINTERCARD", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZINTER", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZINTER", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZINTERSTORE", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZINTERSTORE", "dst", "2", "src1", "src2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "src1", vs[0])
require.Equal(t, "src2", vs[1])
})

t.Run("COMMAND GETKEYS ZINTERCARD", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZINTERCARD", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZUNION", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZUNION", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZUNIONSTORE", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZUNIONSTORE", "dst", "2", "src1", "src2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "src1", vs[0])
require.Equal(t, "src2", vs[1])
})

t.Run("COMMAND GETKEYS ZDIFF", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZDIFF", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS ZDIFFSTORE", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZDIFFSTORE", "dst", "2", "src1", "src2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "src1", vs[0])
require.Equal(t, "src2", vs[1])
})

t.Run("COMMAND GETKEYS ZMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "ZMPOP", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS BZMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "BZMPOP", "0", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS LMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "LMPOP", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})

t.Run("COMMAND GETKEYS BLMPOP", func(t *testing.T) {
r := rdb.Do(ctx, "COMMAND", "GETKEYS", "BLMPOP", "0", "2", "key1", "key2")
vs, err := r.Slice()
require.NoError(t, err)
require.Len(t, vs, 2)
require.Equal(t, "key1", vs[0])
require.Equal(t, "key2", vs[1])
})
}

0 comments on commit 51f4b7e

Please sign in to comment.