aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Hartzell2016-02-28 13:49:56 -0800
committerDominyk Tiller2016-02-29 16:30:23 +0000
commit76767f3d6e89e540241e973b8ffe04690a9a2ccb (patch)
treeeb3e399b0cfea8f056e65467dfb2147cd0964703
parentb4edf23a3624d062fe030a57ad0b2ea1e6b339be (diff)
downloadbrew-76767f3d6e89e540241e973b8ffe04690a9a2ccb.tar.bz2
Formula-Cookbook: Improve testing suggestions
Based on recent feedback on some pull requests, I touched up the section about adding tests to formula. I wanted to make it clearer that the examples demonstrate how to create files on the fly and add a pointer to the tinyxml2 formula (DomT4 pointed it out to me as a good example). Closes Homebrew/homebrew#49641. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
-rw-r--r--share/doc/homebrew/Formula-Cookbook.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/doc/homebrew/Formula-Cookbook.md b/share/doc/homebrew/Formula-Cookbook.md
index 7bc49ff3d..5fb834b20 100644
--- a/share/doc/homebrew/Formula-Cookbook.md
+++ b/share/doc/homebrew/Formula-Cookbook.md
@@ -245,7 +245,7 @@ The [`test do`](http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula#
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 (despite their widespread use) `foo --version` and `foo --help` are bad tests. However, a bad test is better than no test at all.
-See [cmake](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/cmake.rb) for an example of a formula with a good test. A basic `CMakeLists.txt` file is written CMake uses it to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation.
+See [cmake](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/cmake.rb) for an example of a formula with a good test. The formula writes a basic `CMakeLists.txt` file into the test directory then calls CMake to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation. Another good example is [tinyxml2](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/tinyxml2.rb), which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully.
## Manuals