HomePhorge

Fix #3229 - use original value in case/selector regex matching
b581c2348e78Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix #3229 - use original value in case/selector regex matching

The issue is that case/selectors are downcasing the value before it
is compared to the options.
Unfortunately regex are matching in a case sensitive way, which would
make the following manifest fail:

$var = "CaseSensitive"
case $var {

/CaseSensitive/: {
   notice("worked")
}
default: {
  fail "miserably"
}

}

This patch fixes the issue by making sure the regexp match is done
one the original (not downcased) value, but still doing a case
sensitive match.

Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>

Details

Provenance
Brice Figureau <brice-puppet@daysofwonder.com>Authored on
test branch <puppet-dev@googlegroups.com>Committed on Feb 17 2010, 3:50 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU490a03d55e57: Cleaning up a test.
Branches
Unknown
Tags
Unknown

Event Timeline

test branch <puppet-dev@googlegroups.com> committed rPUb581c2348e78: Fix #3229 - use original value in case/selector regex matching (authored by Brice Figureau <brice-puppet@daysofwonder.com>).Feb 17 2010, 3:50 PM