From a721d7bc8f3012deff33ec1fb1e59e5574b52540 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 30 Jun 2020 16:41:20 +0200 Subject: [PATCH] Remove outdated suggestions from Formula#test doc --- Library/Homebrew/formula.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 1e319b53e7..5ed047c98a 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2648,9 +2648,13 @@ class Formula # # The block will create, run in and delete a temporary directory. # - # We are fine if the executable does not error out, so we know linking - # and building the software was OK. - #
system bin/"foobar", "--version"
+ # We want tests that don't require any user input + # and test the basic functionality of the application. + # For example foo build-foo input.foo is a good test + # and foo --version and foo --help are bad tests. + # However, a bad test is better than no test at all. + # + # See: https://docs.brew.sh/Formula-Cookbook#add-a-test-to-the-formula # #
(testpath/"test.file").write <<~EOS
     #   writing some test file, if you need to