diff options
author | Hunter Haugen <hunter@puppetlabs.com> | 2014-12-17 09:24:51 -0800 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2014-12-17 09:24:51 -0800 |
commit | 8726caf996472c9c8822d1f697ff02a51abc54df (patch) | |
tree | 4d3da0a493ab38273d7c05272450ddeb2e3e604b /spec/acceptance | |
parent | 6237446582d71aa722b71ad8873f63c0662b20f7 (diff) | |
parent | 84bd98645f248a1dc3e0ed791e3af6f2ba9996fa (diff) | |
download | puppet-stdlib-8726caf996472c9c8822d1f697ff02a51abc54df.tar.gz puppet-stdlib-8726caf996472c9c8822d1f697ff02a51abc54df.tar.bz2 |
Merge pull request #374 from petems/MODULES-444-add_concat_multiple
MODULES-444-Add concat multiple
Diffstat (limited to 'spec/acceptance')
-rwxr-xr-x | spec/acceptance/concat_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/acceptance/concat_spec.rb b/spec/acceptance/concat_spec.rb index 7bda365..caf2f7d 100755 --- a/spec/acceptance/concat_spec.rb +++ b/spec/acceptance/concat_spec.rb @@ -14,5 +14,27 @@ describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('oper apply_manifest(pp, :catch_failures => true) end + it 'should concat arrays and primitives to array' do + pp = <<-EOS + $output = concat(['1','2','3'],'4','5','6',['7','8','9']) + validate_array($output) + if size($output) != 9 { + fail("${output} should have 9 elements.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'should concat multiple arrays to one' do + pp = <<-EOS + $output = concat(['1','2','3'],['4','5','6'],['7','8','9']) + validate_array($output) + if size($output) != 6 { + fail("${output} should have 9 elements.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end end end |