Age | Commit message (Collapse) | Author |
|
* Improves regex to catch some valid (but less
known) ipv6 strings, mostly those which are a mix
of ipv6 strings and embedded ipv4 numbers
* Regex inspired by the following:
* https://github.com/sindresorhus/ip-regex
* https://gist.github.com/cpetschnig/294476
* The original Dartware forum thread where
someone originally created this beast of a regex,
now lost except to archive.org
* Whilst we're here, we can add the more tricky
ipv6 strings to the existing functions to validate
* Luckily, the `ipaddr` native ruby library used
in the original functions already supports these
|
|
|
|
|
|
|
|
Tests in the new style produces the following documentation output:
abs
should not eq nil
should run abs() and raise an Puppet::ParseError
should run abs(-34) and return 34
should run abs("-34") and return 34
should run abs(34) and return 34
should run abs("34") and return 34
|
|
|
|
rspec-puppet matchers are defined for tests which exist in
spec/functions, but the function unit tests lived in
spec/unit/puppet/parser/functions. This moves them to the correct place
for using rspec-puppet
|