puppetlabs-stdlib/spec/unit/puppet/parser/functions
Joshua Hoblitt 95cf3fed68 (#19272) Add has_element() function
It is exceptionally difficult to determine if an array contains an element matching a specific value without an iteration or loop construct.

This function is the Puppet equivalent of Array.includes?(foo) in Ruby.  The implementation is a verbatim copy of has_key() with the minor modifications needed to support arrays instead of hashes.
2013-02-14 12:06:21 -07:00
..
abs_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
bool2num_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
capitalize_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
chomp_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
chop_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
concat_spec.rb (#19201) Add concat function to join two arrays 2013-02-12 10:00:09 -08:00
delete_at_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
delete_spec.rb Extend delete function for strings and hashes 2012-11-19 08:44:44 -05:00
downcase_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
empty_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
flatten_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
fqdn_rotate_spec.rb puppet-lint cleanup 2012-11-15 10:38:03 -06:00
get_module_path_spec.rb ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00
getvar_spec.rb (Maint) Fix mis-use of rvalue functions as statements 2012-08-20 13:57:09 -07:00
grep_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
has_element_spec.rb (#19272) Add has_element() function 2013-02-14 12:06:21 -07:00
has_interface_with_spec.rb (#13974) Add predicate functions for interface facts 2012-11-07 14:00:44 -08:00
has_ip_address_spec.rb (#13974) Add predicate functions for interface facts 2012-11-07 14:00:44 -08:00
has_ip_network_spec.rb (#13974) Add predicate functions for interface facts 2012-11-07 14:00:44 -08:00
has_key_spec.rb (Maint) Fix mis-use of rvalue functions as statements 2012-08-20 13:57:09 -07:00
hash_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
is_array_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
is_domain_name_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
is_float_spec.rb Add test/validation for is_float if created from an arithmetical operation 2013-01-03 13:37:55 -08:00
is_hash_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
is_integer_spec.rb Add test/validation for is_integer if created from an arithmetical operation 2013-01-03 13:37:55 -08:00
is_ip_address_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
is_mac_address_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
is_numeric_spec.rb Add test/validation for is_numeric if created from an arithmetical operation 2013-01-03 13:37:55 -08:00
is_string_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
join_keys_to_values_spec.rb Add join_keys_to_values function 2012-11-20 16:16:03 -05:00
join_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
keys_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
lstrip_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
max_spec.rb (#17797) min() and max() functions 2012-11-26 16:33:44 -08:00
member_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
merge_spec.rb ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00
min_spec.rb (#17797) min() and max() functions 2012-11-26 16:33:44 -08:00
num2bool_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
parsejson_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
parseyaml_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
pick_spec.rb Add the pick() function 2012-11-15 08:52:19 -05:00
prefix_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
range_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
reject_spec.rb Add reject() function 2012-11-28 14:28:31 -08:00
reverse_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
rstrip_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
shuffle_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
size_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
sort_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
squeeze_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
str2bool_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
str2saltedsha512_spec.rb ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00
strftime_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
strip_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
swapcase_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
time_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
to_bytes_spec.rb (#15872) Add to_bytes function 2012-08-14 08:43:36 -07:00
type_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
unique_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
upcase_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
uriescape_spec.rb Add function, uriescape, to URI.escape strings. Redmine #17459 2012-11-07 09:36:54 -08:00
validate_absolute_path_spec.rb Make sure functions are loaded for each test 2012-08-09 14:51:37 -07:00
validate_array_spec.rb ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00
validate_augeas_spec.rb Add validate_augeas function 2013-01-18 22:02:13 +01:00
validate_bool_spec.rb ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00
validate_cmd_spec.rb validate_cmd: Use Puppet::Util.execute 2013-02-06 18:03:11 +01:00
validate_hash_spec.rb ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00
validate_re_spec.rb Make sure functions are loaded for each test 2012-08-09 14:51:37 -07:00
validate_slength_spec.rb (Maint) use PuppetlabsSpec::PuppetSeams.parser_scope (2.3.x) 2012-07-23 09:13:08 -07:00
validate_string_spec.rb ammend .should raise_error to .to raise_error 2013-02-06 08:12:42 -08:00
values_at_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
values_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00
zip_spec.rb (Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals} 2012-07-23 08:35:00 -07:00