LDP/LDP/wt2db/test.pl

54 lines
590 B
Perl
Raw Normal View History

#!/usr/bin/perl
#
use Wt2Db;
$WT = new Wt2Db;
$buffer = "foo bar
2002-06-21 01:50:53 +00:00
=Section|section=
paragraph
==Subsection|subsection==
paragraph
=Namespaces=
==MailTo==
[[mailto:david@lupercalia.net]]
[[mailto:david@lupercalia.net|David Merrill]]
==HTTP==
[[http://www.tldp.org]]
[[http://www.tldp.org|The Linux Documentation Project]]
*one
**two
**two, again
/**
## ordered
/#
**two once more
**two yet again
/*
Foo
";
$outbuf = '';
foreach $line (split /\n/, $buffer) {
$WT->ProcessLine($line);
}
$WT->ProcessEnd();
$outbuf = $WT->Buffer();
print $outbuf;