Test allowing $ signs in section names
Verifying that this PR addresses https://github.com/puppetlabs/puppetlabs-inifile/pull/98
This commit is contained in:
parent
cabc678131
commit
bd99244353
1 changed files with 36 additions and 0 deletions
|
@ -166,4 +166,40 @@ to-deploy = log --merges --grep='pull request' --format='%s (%cN)' origin/produc
|
|||
]
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue