/[webpac2]/trunk/t/2-input.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/2-input.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 783 by dpavlin, Fri Nov 3 20:56:21 2006 UTC revision 784 by dpavlin, Wed Dec 6 23:43:45 2006 UTC
# Line 125  ok($input = new WebPAC::Input( module => Line 125  ok($input = new WebPAC::Input( module =>
125  ok($input->open( path => "$abs_path/modify_isis/LIBRI", ), "open modify_isis (plain)");  ok($input->open( path => "$abs_path/modify_isis/LIBRI", ), "open modify_isis (plain)");
126  ok(my $rec_p = $input->fetch, 'fetch');  ok(my $rec_p = $input->fetch, 'fetch');
127    
128    # modify_records
129    
130  ok($input->open(  ok($input->open(
131          path => "$abs_path/modify_isis/LIBRI",          path => "$abs_path/modify_isis/LIBRI",
132          modify_records => {          modify_records => {
# Line 138  ok(my $rec = $input->fetch, 'fetch'); Line 140  ok(my $rec = $input->fetch, 'fetch');
140    
141  cmp_ok($rec_p->{200}->[0]->{f} . '. ' . $rec_p->{200}->[0]->{c}, 'eq' ,$rec->{200}->[0]->{f}, 'modify_records working');  cmp_ok($rec_p->{200}->[0]->{f} . '. ' . $rec_p->{200}->[0]->{c}, 'eq' ,$rec->{200}->[0]->{f}, 'modify_records working');
142    
143    diag dump($input);
144    
145    # break encapsulation, bad! bad!
146    $input->{ll_db}->{record} = {
147            900 => 'foo ; bar ; baz',
148    };
149    
150    $input->{modify_record} = {
151            900 => {
152                    '*' => {
153                            ' ; ' => 'a',
154                    }
155            }
156    };
157    
158    diag "hacked: ",dump($input, $input->fetch);

Legend:
Removed from v.783  
changed lines
  Added in v.784

  ViewVC Help
Powered by ViewVC 1.1.26