mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Added unit tests for numeric comparison operators.
This commit is contained in:
@@ -1 +1,93 @@
|
||||
### Empty
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "0",
|
||||
input => "",
|
||||
ret => 1,
|
||||
},
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "5",
|
||||
input => "",
|
||||
ret => 0,
|
||||
},
|
||||
|
||||
### Invalid
|
||||
# xxx interpreted as 0
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "xxx",
|
||||
input => "5",
|
||||
ret => 1,
|
||||
},
|
||||
# xxx interpreted as 0
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "xxx",
|
||||
input => "-1",
|
||||
ret => 0,
|
||||
},
|
||||
# xxx interpreted as 0
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "0",
|
||||
input => "xxx",
|
||||
ret => 1,
|
||||
},
|
||||
# xxx interpreted as 0
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "5",
|
||||
input => "xxx",
|
||||
ret => 0,
|
||||
},
|
||||
|
||||
### General
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "0",
|
||||
input => "-5",
|
||||
ret => 0,
|
||||
},
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "0",
|
||||
input => "0",
|
||||
ret => 1,
|
||||
},
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "0",
|
||||
input => "5",
|
||||
ret => 1,
|
||||
},
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "5",
|
||||
input => "0",
|
||||
ret => 0,
|
||||
},
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "5",
|
||||
input => "5",
|
||||
ret => 1,
|
||||
},
|
||||
{
|
||||
type => "op",
|
||||
name => "ge",
|
||||
param => "5",
|
||||
input => "10",
|
||||
ret => 1,
|
||||
},
|
||||
|
Reference in New Issue
Block a user