Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
546 B

15 years ago
15 years ago
15 years ago
15 years ago
15 years ago
  1. #/usr/bin/perl
  2. use ExtUtils::testlib;
  3. use Text::Markdown 'markdown';
  4. use Text::Markdown::Discount;
  5. use Benchmark;
  6. use File::Slurp;
  7. use Text::Diff;
  8. my $text = read_file('xt/index.text');
  9. my $a = Text::Markdown::Discount::markdown($text);
  10. my $b = Text::Markdown::markdown($text);
  11. unless ( $a eq $b ) {
  12. print diff \$a, \$b;
  13. #die "BOO";
  14. }
  15. my $count = 1000;
  16. timethese($count, {
  17. 'B_Text::Markdown::Discount' => sub { Text::Markdown::Discount::markdown($text) },
  18. 'A_Text::Markdown' => sub { Text::Markdown::markdown($text) },
  19. });