From 15f1ac8775f19908b3f484ccdb21a0dcfda0099f Mon Sep 17 00:00:00 2001 From: Lukas Oberhuber Date: Sat, 30 Jul 2022 11:23:40 +0100 Subject: [PATCH] Integration test for `--debug-symbols` But only checks that the command works. Not that `dsymutil` is called or that `-g` is added to the compile args. (Not sure how to do either in an integration test.) --- Library/Homebrew/test/cmd/install_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index 560bc3393c..590ee68506 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -72,4 +72,14 @@ describe "brew install" do .and be_a_success expect(HOMEBREW_CELLAR/"testball1/HEAD-d5eb689/foo/test").not_to be_a_file end + + it "installs formulae with debug symbols", :integration_test do + setup_test_formula "testball1" + + expect { brew "install", "testball1", "--debug-symbols", "-s" } + .to output(%r{#{HOMEBREW_CELLAR}/testball1/0\.1}o).to_stdout + .and not_to_output.to_stderr + .and be_a_success + expect(HOMEBREW_CELLAR/"testball1/0.1/foo/test").not_to be_a_file + end end