Commit 17248883 authored by Nigel Kukard's avatar Nigel Kukard

Interpret 'yes' in booleanize() as positive

parent 872a01c8
......@@ -343,8 +343,8 @@ sub booleanize
# Nuke whitespaces
$var =~ s/\s//g;
# Allow true, on, set, enabled, 1
if ($var =~ /^(?:true|on|set|enabled|1)$/i) {
# Allow true, on, set, enabled, yes, 1
if ($var =~ /^(?:true|on|set|enabled|yes|1)$/i) {
return 1;
}
......
......@@ -48,6 +48,8 @@ is(booleanize("SeT"),1,"Booleanize of 'SeT' should return 1");
is(booleanize("EnAblED"),1,"Booleanize of 'EnAblED' should return 1");
is(booleanize("yes"),1,"Booleanize of 'yes' should return 1");
is(booleanize(1),1,"Booleanize of 1 should return 1");
is(booleanize("1"),1,"Booleanize of '1' should return 1");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment