Skip to content

Commit

Permalink
Merge pull request redhat-openstack#82 from hunner/grep_sol10
Browse files Browse the repository at this point in the history
Avoid multi-line grep on Solaris 10
  • Loading branch information
Ashley Penney committed Feb 27, 2014
2 parents 5ec46f6 + 49433d0 commit 698e632
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 8 additions & 2 deletions spec/acceptance/ini_setting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

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

Expand Down Expand Up @@ -69,7 +72,10 @@

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

Expand Down
5 changes: 4 additions & 1 deletion spec/acceptance/ini_subsetting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@

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

Expand Down

0 comments on commit 698e632

Please sign in to comment.