From b3fed85b57a5a78b11a5d4e4225155ebd3417fdc Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Fri, 4 Jul 2014 14:31:39 +1000 Subject: [PATCH] Spec for MODULES-1194 Ini_file module does not recognize section names with forward slashes in them https://tickets.puppetlabs.com/browse/MODULES-1194 --- spec/unit/puppet/util/ini_file_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/unit/puppet/util/ini_file_spec.rb b/spec/unit/puppet/util/ini_file_spec.rb index 051579c7d..8e8da9c84 100644 --- a/spec/unit/puppet/util/ini_file_spec.rb +++ b/spec/unit/puppet/util/ini_file_spec.rb @@ -202,4 +202,21 @@ ] end end + + context 'section names with forward slashes in them' do + let(:sample_content) do + template = <<-EOS +[monitor:///var/log/*.log] +disabled = test_value + EOS + template.split("\n") + end + + it "should parse the correct section_names" do + subject.section_names.should match_array [ + '', + 'monitor:///var/log/*.log' + ] + end + end end