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
7864ef85
Commit
7864ef85
authored
Sep 27, 2011
by
antirez
Browse files
new tests for the scripting engine: not allowed commands and write commands after random commands.
parent
9f772cc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/scripting.tcl
View file @
7864ef85
...
...
@@ -123,6 +123,21 @@ start_server {tags {"scripting"}} {
}
e
set _ $e
}
{
*execution time*
}
test
{
EVAL - Scripts can't run certain commands
}
{
set e
{}
catch
{
r eval
{
return redis.call
(
'spop','x'
)}
0
}
e
set e
}
{
*not allowed*
}
test
{
EVAL - Scripts can't run certain commands
}
{
set e
{}
catch
{
r eval
"redis.call('randomkey'); return redis.call('set','x','ciao')"
0
}
e
set e
}
{
*not allowed after*
}
}
start_server
{
tags
{
"scripting repl"
}}
{
...
...
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