1 require 'spec_helper_acceptance'
3 describe 'flatten function', :if => Puppet::Util::Package.versioncmp(Puppet.version, '5.5.0') < 0 do
6 $a = ["a","b",["c",["d","e"],"f","g"]]
7 $b = ["a","b","c","d","e","f","g"]
10 notify { 'output correct': }
13 it 'flattens arrays' do
14 apply_manifest(pp1, :catch_failures => true) do |r|
15 expect(r.stdout).to match(%r{Notice: output correct})
20 $a = ["a","b","c","d","e","f","g"]
21 $b = ["a","b","c","d","e","f","g"]
24 notify { 'output correct': }
27 it 'does not affect flat arrays' do
28 apply_manifest(pp2, :catch_failures => true) do |r|
29 expect(r.stdout).to match(%r{Notice: output correct})
34 it 'handles improper argument counts'
35 it 'handles non-strings'