Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / downcase_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'downcase function', :if => Puppet::Util::Package.versioncmp(return_puppet_version, '6.0.0') < 0 do
4   describe 'success' do
5     pp1 = <<-DOC
6       $a = 'AOEU'
7       $b = 'aoeu'
8       $o = downcase($a)
9       if $o == $b {
10         notify { 'output correct': }
11       }
12     DOC
13     it 'returns the downcase' do
14       apply_manifest(pp1, :catch_failures => true) do |r|
15         expect(r.stdout).to match(%r{Notice: output correct})
16       end
17     end
18
19     pp2 = <<-DOC
20       $a = 'aoeu aoeu'
21       $b = 'aoeu aoeu'
22       $o = downcase($a)
23       if $o == $b {
24         notify { 'output correct': }
25       }
26     DOC
27     it 'doesn\'t affect lowercase words' do
28       apply_manifest(pp2, :catch_failures => true) do |r|
29         expect(r.stdout).to match(%r{Notice: output correct})
30       end
31     end
32   end
33   describe 'failure' do
34     it 'handles improper argument counts'
35     it 'handles non-strings'
36   end
37 end