|
Revision 956, 0.9 kB
(checked in by earle, 22 months ago)
|
|
Complete transition to using skip_all (remove old SKIP blocks).
More verbose reporting for error "require"ing DBD::SQLite.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | use Wiki::Toolkit::Setup::SQLite; |
|---|
| 2 | use OpenGuides::Template; |
|---|
| 3 | use OpenGuides::Test; |
|---|
| 4 | use OpenGuides::Utils; |
|---|
| 5 | use Test::More; |
|---|
| 6 | |
|---|
| 7 | eval { require DBD::SQLite; }; |
|---|
| 8 | |
|---|
| 9 | if ( $@ ) { |
|---|
| 10 | my ($error) = $@ =~ /^(.*?)\n/; |
|---|
| 11 | plan skip_all => "DBD::SQLite could not be used - no database to test with ($error)"; |
|---|
| 12 | } |
|---|
| 13 | |
|---|
| 14 | plan tests => 1; |
|---|
| 15 | |
|---|
| 16 | Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); |
|---|
| 17 | my $config = OpenGuides::Test->make_basic_config; |
|---|
| 18 | my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); |
|---|
| 19 | |
|---|
| 20 | my $out = OpenGuides::Template->output( |
|---|
| 21 | wiki => $wiki, |
|---|
| 22 | config => $config, |
|---|
| 23 | template => "edit_form.tt", |
|---|
| 24 | vars => { |
|---|
| 25 | locales => [ |
|---|
| 26 | { name => "Barville" }, |
|---|
| 27 | { name => "Fooville" }, |
|---|
| 28 | ], |
|---|
| 29 | }, |
|---|
| 30 | ); |
|---|
| 31 | |
|---|
| 32 | like( $out, qr/Barville\nFooville/, |
|---|
| 33 | "locales properly separated in textarea" ); |
|---|