Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / upcase_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'upcase function', :if => Puppet::Util::Package.versioncmp(return_puppet_version, '6.0.0') < 0 do
4   describe 'success' do
5     pp1 = <<-DOC
6       $a = ["wallless", "laparohysterosalpingooophorectomy", "brrr", "goddessship"]
7       $o = upcase($a)
8       notice(inline_template('upcase is <%= @o.inspect %>'))
9     DOC
10     it 'upcases arrays' do
11       apply_manifest(pp1, :catch_failures => true) do |r|
12         expect(r.stdout).to match(%r{upcase is \["WALLLESS", "LAPAROHYSTEROSALPINGOOOPHORECTOMY", "BRRR", "GODDESSSHIP"\]})
13       end
14     end
15
16     pp2 = <<-DOC
17       $a = "wallless laparohysterosalpingooophorectomy brrr goddessship"
18       $o = upcase($a)
19       notice(inline_template('upcase is <%= @o.inspect %>'))
20     DOC
21     it 'upcases strings' do
22       apply_manifest(pp2, :catch_failures => true) do |r|
23         expect(r.stdout).to match(%r{upcase is "WALLLESS LAPAROHYSTEROSALPINGOOOPHORECTOMY BRRR GODDESSSHIP"})
24       end
25     end
26   end
27   describe 'failure' do
28     it 'handles no arguments'
29     it 'handles non strings or arrays'
30   end
31 end