]> git.cworth.org Git - notmuch-wiki/blobdiff - patchformatting.mdwn
patchformatting: Test Suite Enhancements
[notmuch-wiki] / patchformatting.mdwn
index 6ff103a2421df3010240c1d492024c66cb884fcc..914371d4da071d916340c945304a26f02e06021c 100644 (file)
@@ -10,7 +10,7 @@ you should check the following:
 
 2. Read mailing list (archives) and follow the discussions on the patches sent.
 
-3. Get familiar with coding conventions used (in any particular project).
+3. Get familiar with coding conventions used.
 
 This way you get some insight of the look and feel of the patches sent,
 both the way code should be written, how to write commit log messages
@@ -41,6 +41,16 @@ Eric S. Raymond has written good
 [Software Release Practice HOWTO](http://tldp.org/HOWTO/Software-Release-Practice-HOWTO/).
 Check what he has to say about this issue. 
 
+### Test Suite Enhancements
+
+New features as well as bug fixes should typically come with test suite
+enhancements.  The test suite changes should be done first (tagged as *expected
+to fail*), and the feature implementation or bug fix should come second
+(removing the *expected to fail* tag).  This way, the test suite specifies the
+behavior you're trying to implement, be it a new feature or a bug fix.  By
+defining beforehand exactly what you expect to happen, everyone can confirm
+that your patch achieves what it is meant it to.
+
 ## Prepare patches for e-mail submission
 
 If you've made just one commit (containing just one bugfix or new feature)
@@ -119,6 +129,10 @@ actual patch sending to the mailing list.
 
 ### Sending one patch using compatible (emacs) email client.
 
+Sometimes using git-send-email is not possible; It is not installed by
+default and you don't have privileges to install it or you are not
+able to compile it as it has more build-time requirements as git itself.
+
 One alternative way to send your patches is to use, for example, the
 emacs mail client you've already used to send mails to mailing list.
 In this case you have to be very careful to keep the patch contents