Skip to content

Commit

Permalink
Test allowing $ signs in section names
Browse files Browse the repository at this point in the history
Verifying that this PR addresses puppetlabs/puppetlabs-inifile#98
  • Loading branch information
johnsyweb committed Jun 28, 2014
1 parent cabc678 commit bd99244
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions spec/unit/puppet/util/ini_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,40 @@
]
end
end

context 'Samba INI file with dollars in section names' do
let(:sample_content) do
template = <<-EOS
[global]
workgroup = FELLOWSHIP
; ...
idmap config * : backend = tdb
[printers]
comment = All Printers
; ...
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[Shares]
path = /home/shares
read only = No
guest ok = Yes
EOS
template.split("\n")
end

it "should parse the correct section_names" do
subject.section_names.should match_array [
'',
'global',
'printers',
'print$',
'Shares'
]
end
end
end

0 comments on commit bd99244

Please sign in to comment.