/[webpac2]/trunk/t/3-normalize.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/3-normalize.t

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

revision 819 by dpavlin, Wed Apr 11 10:09:34 2007 UTC revision 923 by dpavlin, Wed Oct 31 00:26:43 2007 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5  use Test::More tests => 341;  use Test::More tests => 347;
6  use Test::Exception;  use Test::Exception;
7  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
8  use blib;  use blib;
# Line 375  sub test_s { Line 375  sub test_s {
375          _set_rec( $rec2 );          _set_rec( $rec2 );
376    
377          test_s(qq{          test_s(qq{
378                  tag('Title',                  search_display('Title',
379                          rec('200','a')                          rec('200','a')
380                  );                  );
381          });          });
382          test_s(qq{          test_s(qq{
383                  tag('Who',                  search_display('Who',
384                          join_with(" ",                          join_with(" ",
385                                  rec('702','a'),                                  rec('702','a'),
386                                  rec('702','b')                                  rec('702','b')
# Line 431  sub test_s { Line 431  sub test_s {
431          test_check_ds('display');          test_check_ds('display');
432    
433          _clean_ds();          _clean_ds();
434          test_s(qq{ tag('something', '42'); });          test_s(qq{ search_display('something', '42'); });
435          test_s(qq{ tag('empty', ''); });          test_s(qq{ search_display('empty', ''); });
436          test_check_ds('search');          test_check_ds('search');
437          test_check_ds('display');          test_check_ds('display');
438    
439          _clean_ds();          _clean_ds();
440            test_s(qq{ sorted('something', '42'); });
441            test_s(qq{ sorted('empty', ''); });
442            test_check_ds('sorted');
443    
444            _clean_ds();
445          my $n = read_file( "$abs_path/data/normalize.pl" );          my $n = read_file( "$abs_path/data/normalize.pl" );
446          $n .= "\n1;\n";          $n .= "\n1;\n";
447          #diag "normalize code:\n$n\n";          #diag "normalize code:\n$n\n";
# Line 460  sub test_s { Line 465  sub test_s {
465          is_deeply( $ds, {          is_deeply( $ds, {
466                  'mixed' => {                  'mixed' => {
467                          'search' => [ '200a', '200b' ],                          'search' => [ '200a', '200b' ],
                         'tag' => 'mixed'  
468                  }                  }
469          }, 'correct get_ds');          }, 'correct get_ds');
470    
# Line 484  sub test_s { Line 488  sub test_s {
488          is_deeply( $ds, {          is_deeply( $ds, {
489                  'mixed' => {                  'mixed' => {
490                          'search' => [ '200a', '200-solo' ],                          'search' => [ '200a', '200-solo' ],
                         'tag' => 'mixed'  
491                  }                  }
492          }, 'correct get_ds');          }, 'correct get_ds');
493    

Legend:
Removed from v.819  
changed lines
  Added in v.923

  ViewVC Help
Powered by ViewVC 1.1.26