Avoid multi-line grep on Solaris 10

This commit is contained in:
Hunter Haugen 2014-02-27 12:53:46 -08:00
parent 5ec46f6df8
commit 49433d02bf
2 changed files with 12 additions and 3 deletions

View file

@ -21,7 +21,10 @@ describe 'ini_setting resource' do
describe file(path) do
it { should be_file }
it { should contain(content) }
#XXX Solaris 10 doesn't support multi-line grep
it("should contain #{content}", :unless => fact('operatingsystemrelease').match(/^10_u\d+$/) {
should contain(content)
}
end
end
@ -69,7 +72,10 @@ describe 'ini_setting resource' do
describe file('/tmp/ini_setting.ini') do
it { should be_file }
it { should contain("four = five\n[one]\ntwo = three") }
#XXX Solaris 10 doesn't support multi-line grep
it("should contain four = five\n[one]\ntwo = three", :unless => fact('operatingsystemrelease').match(/^10_u\d+$/) {
should contain("four = five\n[one]\ntwo = three")
}
end
end

View file

@ -71,7 +71,10 @@ describe 'ini_subsetting resource' do
describe file('/tmp/ini_subsetting.ini') do
it { should be_file }
it { should contain("[one]\nkey = alphabet betatrons") }
#XXX Solaris 10 doesn't support multi-line grep
it("should contain [one]\nkey = alphabet betatrons", :unless => fact('operatingsystemrelease').match(/^10_u\d+$/) {
should contain("[one]\nkey = alphabet betatrons")
}
end
end