#!perl BEGIN { chdir 't' if -d 't' } use strict; use warnings; use Test::More tests => 9; use Test::NoWarnings; use_ok 'Text::MediawikiFormat', as => 'wf', process_html => 0 or exit; my $wikitext = <.*?
  • indented|s, 'nested lists should start correctly'; like $htmltext, qr|indented list.*?
  • .*?|s, '... and end correctly'; $wikitext = <\s*
  • 1
  • \s*
  • 2
      \s*
    • 2\.1
        \s*
      • 2\.1\.1
      • \s*
      \s*
    • \s*
    \s*
  • \s*
  • 3
  • \s* \s* |sx, 'nesting should be correct for multiple levels'; like $htmltext, qr|
  • 4<|s, 'spaces should work instead of tabs'; like $htmltext, qr|
  • 4
      \s*
    • 4.1
        \s*
      • 4.1.1
      • \s*
      • 4.1.2
      • \s*
      \s*
    • |sx, 'nesting should be correct for spaces too'; TODO: { local $TODO = 'Dictionary lists not nesting correctly.'; ### ### Dictionary Lists ### $wikitext = <
      A
      A.a
      1. A.a.1
        1. A.a.1.1
      2. A.a.2
        • A.a.2.*
        • A.a.2.*
          1. A.a.2.*.1
      A.b
      ', 'lists nest correctly within dictionary lists'; }