Changeset 361 for trunk/t/12_macros.t
- Timestamp:
- 06/07/04 21:39:35 (5 years ago)
- Files:
-
- 1 modified
-
trunk/t/12_macros.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/t/12_macros.t
r180 r361 4 4 use Test::More tests => 2; 5 5 6 my $config = Config::Tiny->read( "wiki.conf" ) 7 or die "Couldn't read wiki.conf"; 8 my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); 9 my $formatter = $wiki->formatter; 6 eval { require DBD::SQLite; }; 7 my $have_sqlite = $@ ? 0 : 1; 10 8 11 my $wikitext = <<WIKI; 9 SKIP: { 10 skip "DBD::SQLite not installed - no database to test with", 2 11 unless $have_sqlite; 12 13 my $config = Config::Tiny->new; 14 $config->{_} = { 15 dbtype => "sqlite", 16 dbname => "t/node.db", 17 indexing_directory => "t/indexes", 18 script_url => "", 19 script_name => "", 20 }; 21 22 my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); 23 my $formatter = $wiki->formatter; 24 25 my $wikitext = <<WIKI; 12 26 13 27 \@INDEX_LINK [[Category Foo]] … … 17 31 WIKI 18 32 19 my $html = $formatter->format($wikitext); 20 like( $html, qr/View all pages in Category Foo/, 21 "\@INDEX_LINK has right default link text" ); 22 like( $html, qr/>Bars<\/a>/, "...and can be overridden" ); 33 my $html = $formatter->format($wikitext); 34 like( $html, qr/View all pages in Category Foo/, 35 "\@INDEX_LINK has right default link text" ); 36 like( $html, qr/>Bars<\/a>/, "...and can be overridden" ); 37 }
