Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b19e7457
Commit
b19e7457
authored
Nov 14, 2014
by
antirez
Browse files
scripting.tcl tests order fixed to match unstable branch.
parent
ce960696
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/scripting.tcl
View file @
b19e7457
...
...
@@ -184,25 +184,6 @@ start_server {tags {"scripting"}} {
set e
}
{
*against a key*
}
test
{
EVAL - Numerical sanity check from bitop
}
{
r eval
{
assert
(
0x7fffffff == 2147483647,
"broken hex literals"
);
assert
(
0xffffffff == -1 or 0xffffffff == 2^32-1,
"broken hex literals"
);
assert
(
tostring
(
-1
)
==
"-1"
,
"broken tostring()"
);
assert
(
tostring
(
0xffffffff
)
==
"-1"
or
tostring
(
0xffffffff
)
==
"4294967295"
,
"broken tostring()"
)
}
0
}
{}
test
{
EVAL - Verify minimal bitop functionality
}
{
r eval
{
assert
(
bit.tobit
(
1
)
== 1
);
assert
(
bit.band
(
1
)
== 1
);
assert
(
bit.bxor
(
1,2
)
== 3
);
assert
(
bit.bor
(
1,2,4,8,16,32,64,128
)
== 255
)
}
0
}
{}
test
{
EVAL - JSON numeric decoding
}
{
# We must return the table as a string because otherwise
# Redis converts floats to ints and we get 0 and 1023 instead
...
...
@@ -272,6 +253,25 @@ start_server {tags {"scripting"}} {
}
0
}
{
82a17905a17881a17882a17905a17881a17882a17905a17881a17882a17905a17881a17882a17905a17881a17882a17905a17881a17882a17905a17881a17882a17905a17881a178c0 1 1
}
test
{
EVAL - Numerical sanity check from bitop
}
{
r eval
{
assert
(
0x7fffffff == 2147483647,
"broken hex literals"
);
assert
(
0xffffffff == -1 or 0xffffffff == 2^32-1,
"broken hex literals"
);
assert
(
tostring
(
-1
)
==
"-1"
,
"broken tostring()"
);
assert
(
tostring
(
0xffffffff
)
==
"-1"
or
tostring
(
0xffffffff
)
==
"4294967295"
,
"broken tostring()"
)
}
0
}
{}
test
{
EVAL - Verify minimal bitop functionality
}
{
r eval
{
assert
(
bit.tobit
(
1
)
== 1
);
assert
(
bit.band
(
1
)
== 1
);
assert
(
bit.bxor
(
1,2
)
== 3
);
assert
(
bit.bor
(
1,2,4,8,16,32,64,128
)
== 255
)
}
0
}
{}
test
{
SCRIPTING FLUSH - is able to clear the scripts cache?
}
{
r set mykey myval
set v
[
r evalsha fd758d1589d044dd850a6f05d52f2eefd27f033f 1 mykey
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment