/[gentoo-perl]/g-cpan/trunk/t/02ebuilds_read.t
Gentoo

Contents of /g-cpan/trunk/t/02ebuilds_read.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 74 - (hide annotations) (download) (as text)
Tue Jun 6 00:31:09 2006 UTC (12 years ago) by mcummings
File MIME type: text/troff
File size: 1586 byte(s)
Bug 134781 - RDEPEND=DEPEND line in generated ebuilds


1 mcummings 50 #
2     #===============================================================================
3     #
4     # FILE: 02ebuilds_read.t
5     #
6 mcummings 54 # DESCRIPTION: Test Gentoo::Portage Functionality
7 mcummings 50 #
8     # FILES: ---
9     # BUGS: ---
10     # NOTES: ---
11     # AUTHOR: Michael Cummings (), <mcummings@gentoo.org>
12     # COMPANY: Gentoo
13     # VERSION: 1.0
14     # CREATED: 05/09/06 14:36:47 EDT
15     # REVISION: ---
16     #===============================================================================
17    
18     use strict;
19     use warnings;
20    
21     use Test::More qw(no_plan);
22     #tests => 5;
23    
24    
25    
26    
27     # Verify we can load Gentoo name space
28     BEGIN { use_ok(' Gentoo'); }
29    
30     # Can we call new?
31     my $GC = Gentoo->new();
32     ok( defined($GC), 'new() works' );
33    
34 mcummings 57 my $portdir;
35 mcummings 50 # Can we get the PORTDIR value?
36 mcummings 57 ok( $portdir = $GC->getValue("PORTDIR"), 'getValue("PORTDIR") worked' );
37 mcummings 50
38 mcummings 57 $GC->getAvailableEbuilds($portdir,'gnustep-base');
39 mcummings 50 # Test getting the contents of a directory
40     ok( $GC->{packagelist}, 'Grabbed gnustep-base' );
41 mcummings 57
42 mcummings 50 $GC->{portage_categories} = [ "gnustep-base" ];
43 mcummings 57 $GC->getAvailableVersions($portdir);
44 mcummings 65 ok( $GC->{ebuilds}, 'Digested available versions' );
45     ok( $GC->{ebuilds}{portage_lc}, 'Portage_lc check' );
46     ok( $GC->{ebuilds}{portage}, 'Digested available versions' );
47     foreach my $ebuild (keys %{$GC->{ebuilds}{portage_lc}} ) {
48 mcummings 50 ok($ebuild, '$ebuild has value');
49 mcummings 65 ok($GC->{ebuilds}{portage_lc}{$ebuild}, '$ebuild has version');
50 mcummings 50 }
51 mcummings 74 foreach my $ebuild (keys %{$GC->{ebuilds}{portage}} ) {
52 mcummings 65 ok($GC->{ebuilds}{portage}{$ebuild}{name}, "$ebuild name check");
53 mcummings 74 ok($GC->{ebuilds}{portage}{$ebuild}{category}, "$ebuild category check");
54 mcummings 50 }

  ViewVC Help
Powered by ViewVC 1.1.20