Changeset 3243 in MondoRescue
- Timestamp:
- Jan 22, 2014, 8:36:12 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/MondoRescue/t/01-read-all-link.t
r3228 r3243 1 1 #!/usr/bin/perl -w 2 use Test::More 'no_plan';3 2 use File::Temp qw/ tempdir /; 4 3 use File::Copy; … … 58 57 ); 59 58 59 my $more = 1; 60 61 eval 62 { 63 require Test::More; 64 Test::More->import(); 65 no_plan(); 66 }; 67 # Test::More not found so simpler test 68 if ($@) { 69 require Test; 70 Test->import(); 71 $more = 0; 72 plan(tests => 12); 73 } 60 74 # Got, expected, comment 61 is(@{$h->{"$bd/usr/bin/toto"}}[0], "$bd/usr/bin/toto", "File link in same dir to itself");62 is(@{$h->{"$bd/usr/bin/toto"}}[1], "$bd/usr/bin/perl", "File link in same dir to link");63 is(@{$h->{"$bd/var/truc"}}[0], "$bd/var/truc", "File link in another absolute dir to itself");64 is(@{$h->{"$bd/var/truc"}}[1], "$bd/usr/bin/perl", "File link in another absolute dir to link");65 is(@{$h->{"$bd/var/spool/toto"}}[0], "$bd/var/spool/toto", "File link in another relative dir to itself");66 is(@{$h->{"$bd/var/spool/toto"}}[1], "$bd/usr/bin/perl", "File link in another relative dir to link");67 is(@{$h->{"$bd/var/spool/titi"}}[0], "$bd/var/spool/titi", "Directory link in same dir to itself");68 is(@{$h->{"$bd/var/spool/titi"}}[1], "$bd/var/spool/mail", "Directory link in same dir to link");69 is(@{$h->{"$bd/var/lib/titi"}}[0], "$bd/var/lib/titi", "Directory link in another relative dir to itself");70 is(@{$h->{"$bd/var/lib/titi"}}[1], "$bd/var/spool/mail", "Directory link in another relative dir to link");71 is(@{$h->{"$bd/var/tutu"}}[0], "$bd/var/tutu", "Directory link in another absolute dir to itself");72 is(@{$h->{"$bd/var/tutu"}}[1], "$bd/var/spool/mail", "Directory link in another absolute dir to link");75 myis(@{$h->{"$bd/usr/bin/toto"}}[0], "$bd/usr/bin/toto", "File link in same dir to itself"); 76 myis(@{$h->{"$bd/usr/bin/toto"}}[1], "$bd/usr/bin/perl", "File link in same dir to link"); 77 myis(@{$h->{"$bd/var/truc"}}[0], "$bd/var/truc", "File link in another absolute dir to itself"); 78 myis(@{$h->{"$bd/var/truc"}}[1], "$bd/usr/bin/perl", "File link in another absolute dir to link"); 79 myis(@{$h->{"$bd/var/spool/toto"}}[0], "$bd/var/spool/toto", "File link in another relative dir to itself"); 80 myis(@{$h->{"$bd/var/spool/toto"}}[1], "$bd/usr/bin/perl", "File link in another relative dir to link"); 81 myis(@{$h->{"$bd/var/spool/titi"}}[0], "$bd/var/spool/titi", "Directory link in same dir to itself"); 82 myis(@{$h->{"$bd/var/spool/titi"}}[1], "$bd/var/spool/mail", "Directory link in same dir to link"); 83 myis(@{$h->{"$bd/var/lib/titi"}}[0], "$bd/var/lib/titi", "Directory link in another relative dir to itself"); 84 myis(@{$h->{"$bd/var/lib/titi"}}[1], "$bd/var/spool/mail", "Directory link in another relative dir to link"); 85 myis(@{$h->{"$bd/var/tutu"}}[0], "$bd/var/tutu", "Directory link in another absolute dir to itself"); 86 myis(@{$h->{"$bd/var/tutu"}}[1], "$bd/var/spool/mail", "Directory link in another absolute dir to link"); 73 87 chdir "/tmp"; 74 88 exit(0); 89 90 sub myis { 91 92 if ($more eq 1) { 93 return(is(@_)); 94 } else { 95 my $p1 = shift; 96 my $p2 = shift; 97 my $p3 = shift; 98 print "# test $p3\n"; 99 return(ok($p1,$p2)); 100 } 101 } 102
Note:
See TracChangeset
for help on using the changeset viewer.