Mercurial > public > mercurial-scm > hg-stable
diff tests/test-minirst.py @ 15039:c981f4a9ea74
minirst: add a helper function to build an RST table from an array
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 11 Aug 2011 22:40:43 -0500 |
parents | df47381b41d6 |
children | e2df5b866d22 |
line wrap: on
line diff
--- a/tests/test-minirst.py Thu Aug 11 22:40:41 2011 -0500 +++ b/tests/test-minirst.py Thu Aug 11 22:40:43 2011 -0500 @@ -232,14 +232,13 @@ debugformat('comments', comments, 30) -table = """ - === === === - a b c - === === === - 1 2 3 - foo bar baz - aa bb sdfsdfsdf this line is way too long for this cell. - === === === -""" + +data = [['a', 'b', 'c'], + ['1', '2', '3'], + ['foo', 'bar', 'baz this list is very very very long man']] + +table = minirst.maketable(data, 2, True) + +print table debugformat('table', table, 30)