diff options
author | Travis Fields <travis@puppetlabs.com> | 2015-01-13 17:16:10 -0800 |
---|---|---|
committer | Travis Fields <travis@puppetlabs.com> | 2015-01-13 17:16:10 -0800 |
commit | ac3e51bac57ecc4b29965b5df5f10c2934b61cd0 (patch) | |
tree | 71413b757c0e0ec4d21727386979354e50099fdc /spec/acceptance/concat_spec.rb | |
parent | 80f09623b63cf6946b5913b629911e2c49b5d1dd (diff) | |
parent | 8db1f2e2f082cd688fa061fd6840cd0cea747232 (diff) |
Merge branch 'master' into 4.5.x
Diffstat (limited to 'spec/acceptance/concat_spec.rb')
-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..06b649f 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) != 9 { + fail("${output} should have 9 elements.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end end end |