Merge pull request #15000 from issyl0/fix-extra-blank-line-in-caveats
caveats: Remove extra blank line between `keg_only` and other caveats
This commit is contained in:
commit
b979646c42
@ -94,7 +94,8 @@ class Caveats
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
s << "\n"
|
s << "\n" unless s.end_with?("\n")
|
||||||
|
s
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -249,6 +249,32 @@ describe Caveats do
|
|||||||
expect(caveats).to include("#{f.opt_share}/pkgconfig")
|
expect(caveats).to include("#{f.opt_share}/pkgconfig")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "when joining different caveat types together" do
|
||||||
|
let(:f) do
|
||||||
|
formula do
|
||||||
|
url "foo-1.0"
|
||||||
|
keg_only "some reason"
|
||||||
|
|
||||||
|
def caveats
|
||||||
|
"something else"
|
||||||
|
end
|
||||||
|
|
||||||
|
service do
|
||||||
|
run [bin/"cmd"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
let(:caveats) { described_class.new(f).caveats }
|
||||||
|
|
||||||
|
it "adds the correct amount of new lines to the output" do
|
||||||
|
expect(caveats).to include("something else")
|
||||||
|
expect(caveats).to include("keg-only")
|
||||||
|
expect(caveats).to include("if you don't want/need a background service")
|
||||||
|
expect(caveats.count("\n")).to eq(9)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "shell completions" do
|
describe "shell completions" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user