r27336 - /trunk/dh-make-perl/t/AptContents.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Nov 27 08:35:15 UTC 2008


Author: dmn
Date: Thu Nov 27 08:35:12 2008
New Revision: 27336

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27336
Log:
t/AptContents: test the source of information

Modified:
    trunk/dh-make-perl/t/AptContents.t

Modified: trunk/dh-make-perl/t/AptContents.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/AptContents.t?rev=27336&op=diff
==============================================================================
--- trunk/dh-make-perl/t/AptContents.t (original)
+++ trunk/dh-make-perl/t/AptContents.t Thu Nov 27 08:35:12 2008
@@ -6,6 +6,7 @@
 use Test::More 'no_plan';
 
 use FindBin qw($Bin);
+use File::Touch qw(touch);
 
 require "$Bin/../dh-make-perl";        # Load our code for testing.
 
@@ -36,4 +37,20 @@
 
 ok( -f "$Bin/Contents.cache", 'Contents.cache created' );
 
+is( $apt_contents->source, 'parsed files', 'no cache was used' );
+
+$apt_contents = AptContents->new(
+    { homedir => $Bin, contents_dir => "$Bin/contents", verbose => 0 }
+);
+
+is( $apt_contents->source, 'cache', 'cache was used' );
+
+touch( glob "$Bin/contents/*Contents*" );
+
+$apt_contents = AptContents->new(
+    { homedir => $Bin, contents_dir => "$Bin/contents", verbose => 0 }
+);
+
+is( $apt_contents->source, 'parsed files', 'cache updated' );
+
 ok( unlink "$Bin/Contents.cache", 'Contents.cache unlnked' );




More information about the Pkg-perl-cvs-commits mailing list