Patchwork [1,of,3] test-extension: improve test readability

login
register
mail settings
Submitter Gregory Szorc
Date Jan. 16, 2015, 4:36 a.m.
Message ID <5d836f514e0bc34c7b1d.1421382978@3.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/7484/
State Accepted
Headers show

Comments

Gregory Szorc - Jan. 16, 2015, 4:36 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1421380026 28800
#      Thu Jan 15 19:47:06 2015 -0800
# Node ID 5d836f514e0bc34c7b1dec3a474f78c386791372
# Parent  049a9e3a078d7c988cb12ed456aad6ec2779ea69
test-extension: improve test readability

There was a mountain of text in this file that made reading the tests
difficult. Inserting some line breaks greatly improves the situation.

Patch

diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -866,8 +866,9 @@  Broken disabled extension and command:
   > def throw(ui, **opts):
   >     """throws an exception"""
   >     raise Bogon()
   > EOF
+
 No declared supported version, extension complains:
   $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
   ** Unknown exception encountered with possibly-broken third-party extension throw
   ** which supports versions unknown of Mercurial.
@@ -875,8 +876,9 @@  No declared supported version, extension
   ** If that fixes the bug please report it to the extension author.
   ** Python * (glob)
   ** Mercurial Distributed SCM * (glob)
   ** Extensions loaded: throw
+
 empty declaration of supported version, extension complains:
   $ echo "testedwith = ''" >> throw.py
   $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
   ** Unknown exception encountered with possibly-broken third-party extension throw
@@ -885,8 +887,9 @@  empty declaration of supported version, 
   ** If that fixes the bug please report it to the extension author.
   ** Python * (glob)
   ** Mercurial Distributed SCM (*) (glob)
   ** Extensions loaded: throw
+
 If the extension specifies a buglink, show that:
   $ echo 'buglink = "http://example.com/bts"' >> throw.py
   $ rm -f throw.pyc throw.pyo
   $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
@@ -896,8 +899,9 @@  If the extension specifies a buglink, sh
   ** If that fixes the bug please report it to http://example.com/bts
   ** Python * (glob)
   ** Mercurial Distributed SCM (*) (glob)
   ** Extensions loaded: throw
+
 If the extensions declare outdated versions, accuse the older extension first:
   $ echo "from mercurial import util" >> older.py
   $ echo "util.version = lambda:'2.2'" >> older.py
   $ echo "testedwith = '1.9.3'" >> older.py
@@ -911,8 +915,9 @@  If the extensions declare outdated versi
   ** If that fixes the bug please report it to the extension author.
   ** Python * (glob)
   ** Mercurial Distributed SCM (version 2.2)
   ** Extensions loaded: throw, older
+
 One extension only tested with older, one only with newer versions:
   $ echo "util.version = lambda:'2.1.0'" >> older.py
   $ rm -f older.pyc older.pyo
   $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
@@ -923,8 +928,9 @@  One extension only tested with older, on
   ** If that fixes the bug please report it to the extension author.
   ** Python * (glob)
   ** Mercurial Distributed SCM (version 2.1.0)
   ** Extensions loaded: throw, older
+
 Older extension is tested with current version, the other only with newer:
   $ echo "util.version = lambda:'1.9.3'" >> older.py
   $ rm -f older.pyc older.pyo
   $ hg --config extensions.throw=throw.py --config extensions.older=older.py \