Skip to content
Snippets Groups Projects
Commit c4e7487b authored by Philippe ALEXANDRE's avatar Philippe ALEXANDRE
Browse files

Do case insensitive comparaison for booleans - Fix #125

parent c808d952
No related branches found
No related tags found
No related merge requests found
...@@ -80,10 +80,20 @@ func (t *testItem) execute(s string) (result bool) { ...@@ -80,10 +80,20 @@ func (t *testItem) execute(s string) (result bool) {
switch t.Compare.Op { switch t.Compare.Op {
case "eq": case "eq":
result = flagVal == t.Compare.Value // Do case insensitive comparaison for booleans ...
if value == "false" || value == "true" {
result = value == t.Compare.Value
} else {
result = flagVal == t.Compare.Value
}
case "noteq": case "noteq":
result = !(flagVal == t.Compare.Value) // Do case insensitive comparaison for booleans ...
if value == "false" || value == "true" {
result = !(value == t.Compare.Value)
} else {
result = !(flagVal == t.Compare.Value)
}
case "gt": case "gt":
a, b := toNumeric(flagVal, t.Compare.Value) a, b := toNumeric(flagVal, t.Compare.Value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment