This is not a valid test because the string is not passed direct to `sed`; it is interpreted by Puppet first. Puppet converts a double backslash ("\\\\") to a single backslash ("\\"), so the string is correctly changed to just "\\+" by the time it is passed to `sed`. Puppet sees the "\\+" as an escaped character, but this is not a permitted escape sequence (see http://docs.puppetlabs.com/puppet/latest/reference/lang_datatypes.html#strings) so Puppet logs a warning. My patch removes the warning.