root/trunk/plagger/t/regression/cookies-nofile.t

Revision 1312 (checked in by miyagawa, 14 years ago)

really localize captured WARN handler. 'No such file or directory' is locale dependent.

Line 
1 use t::TestPlagger;
2 use Plagger::UserAgent;
3
4 test_requires('HTTP::Cookies::Safari');
5 plan 'no_plan';
6 run_eval_expected_with_capture;
7
8 __END__
9
10 === Test with non-existent file
11 --- input config
12 global:
13   user_agent:
14     cookies: /blahblahblah/Cookies.plist
15   log:
16     level: warn
17 plugins:
18   - module: Subscription::Config
19     # hack to use rule for eval
20     rule:
21       expression: Plagger::UserAgent->new;
22 --- expected
23 open my $fh, "/tmp/xxxxxxxx";
24 my $no_such_file = $!;
25 like $warning, qr/Cookies\.plist: $no_such_file/
26
Note: See TracBrowser for help on using the browser.