From f000aa6898806ef97e9e555625428197fabc2c58 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 29 Dec 2008 11:41:31 +0000 Subject: fallback for die-ing writers: use the parser git-svn-id: svn://luxion/repos/WebCoso/trunk@395 fcb26f47-9200-0410-b104-b98ab5b095f3 --- t/fcp-01.t | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't') diff --git a/t/fcp-01.t b/t/fcp-01.t index 2df0d8c..c54b61f 100644 --- a/t/fcp-01.t +++ b/t/fcp-01.t @@ -111,8 +111,17 @@ is($calls{rstuff},1,'called reader'); is($fc->get($wr_file->stringify), 'bad', 'parsed after put'); + +$fc->add_writer(qr{\.stuff$} => sub { die 'bad call' }); +$wr_contents='buh'; +$fc->put($wr_file->stringify,$wr_contents); +is($calls{rstuff},2,'called reader on writer exception'); +is($fc->get($wr_file->stringify), + 'bad', + 'parsed after put with writer exception'); } + is($fc->get('nosuchfile'),undef,'return undef on non-existant files'); { -- cgit v1.2.3