puppetlabs-stdlib/spec/unit/puppet
Martin Hellmich 0206d367c0 changed the validate_slength function to accept a min length
An optional third parameter can be given a min length. The function
then only passes successfully, if all strings are in the range
min_length <= string <= max_length

update and fix function and unit tests

the check for the minlength has to be written differently
because 0 values should be possible. We now check
a) if the input is convertible, and throw a ParseError and
b) if the input .is_a?(Numeric) and ask for a positive number
it's not as clean as for maxlength, but keeps a similar behaviour

refined the error checking for the min length

try to convert to Integer(args[2]) and fail,
if it's not possible

changed the tests accordingly to the new parameter checking
2013-08-06 10:05:16 +02:00
..
parser/functions changed the validate_slength function to accept a min length 2013-08-06 10:05:16 +02:00
provider/file_line Add support for a 'match' parameter to file_line 2012-08-14 09:55:30 -07:00
type ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00