root/trunk/plagger/t/plugins/Publish-Takahashi/publish.t

Revision 1651 (checked in by mark, 14 years ago)

r29@travis: mark | 2006-09-02 12:02:56 +0100

added tests for Publish
Takahashi

Line 
1 use strict;
2 use FindBin;
3 use t::TestPlagger;
4 use File::Spec;
5
6 our $output = File::Spec->rel2abs("$FindBin::Bin/89c7ff2fc4bb5e80be21aa7cae83e2d1.xul");
7 our $css    = File::Spec->rel2abs("$FindBin::Bin/takahashi.css");
8 our $js     = File::Spec->rel2abs("$FindBin::Bin/takahashi.js");
9
10 test_plugin_deps;
11 plan 'no_plan';
12 run_eval_expected;
13
14 END {
15     unlink $output if -e $output;
16     unlink $css    if -e $css;
17     unlink $js     if -e $js;
18 }
19
20 __END__
21
22 === Takahashi
23 --- input config output_file
24 plugins:
25   - module: Subscription::Config
26     config:
27       feed:
28         - file://$t::TestPlagger::BaseDirURI/t/samples/rss-full.xml
29   - module: Publish::Takahashi
30     config:
31       dir: $FindBin::Bin
32 --- expected
33
34 # check the file exists
35 ok -f $main::output;
36 ok -s $main::output > 1024;
37
38 # check that the file contents matches
39 file_contains($main::output, qr/Consolas/);
40
41 # check we also included the takahashi files
42 ok -f $main::css;
43 ok -f $main::js;
Note: See TracBrowser for help on using the browser.