~ubuntu-branches/ubuntu/quantal/libtext-wikiformat-perl/quantal

« back to all changes in this revision

Viewing changes to t/lists-nested.t

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Mako Hill
  • Date: 2011-02-12 14:44:49 UTC
  • mfrom: (1.1.3 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212144449-6lcsb4ihr1ayymis
Tags: 0.79-1
* New upstream release. (Closes: #583317)
* Fixed broken watch file. (Closes: #449734)
* Move to new source format and update package in a various ways.
* Suppress packlist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!perl
2
2
 
3
 
BEGIN { chdir 't' if -d 't' }
4
 
 
5
3
use strict;
6
4
use warnings;
7
5
 
38
36
$htmltext = Text::WikiFormat::format( $wikitext );
39
37
 
40
38
like( $htmltext,
41
 
          qr|<li>1</li>\s*<li>2<ul>\s*<li>2.1<ul>\s*<li>2.1.1</li>\s*
42
 
          </ul>\s*</li>\s*</ul>\s*</li>\s*</ul>|sx,
43
 
          'nesting should be correct for more than 2 levels' );
 
39
          qr|<ul>\s*
 
40
             <li>1</li>\s*
 
41
             <li>2<ul>\s*
 
42
             <li>2\.1<ul>\s*
 
43
             <li>2\.1\.1</li>\s*
 
44
             </ul>\s*
 
45
             </li>\s*
 
46
             </ul>\s*
 
47
             </li>\s*
 
48
             <li>3</li>\s*
 
49
             </ul>\s*
 
50
             <ul>\s*
 
51
             <li>4<ul>\s*
 
52
             <li>4\.1<ul>\s*
 
53
             <li>4\.1\.1</li>\s*
 
54
             <li>4\.1\.2</li>\s*
 
55
             </ul>\s*
 
56
             </li>\s*
 
57
             </ul>\s*
 
58
             </li>\s*
 
59
             <li>5</li>\s*
 
60
             </ul>|sx,
 
61
          'nesting should be correct for multiple levels' );
44
62
like( $htmltext, qr|<li>4<|s,
45
63
        'spaces should work instead of tabs' );
46
64
like( $htmltext,