/[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 - (show annotations) (download) (as text)
Tue Jun 6 00:31:09 2006 UTC (8 years, 4 months ago) by mcummings
File MIME type: text/troff
File size: 1586 byte(s)
Bug 134781 - RDEPEND=DEPEND line in generated ebuilds


1 #
2 #===============================================================================
3 #
4 # FILE: 02ebuilds_read.t
5 #
6 # DESCRIPTION: Test Gentoo::Portage Functionality
7 #
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 my $portdir;
35 # Can we get the PORTDIR value?
36 ok( $portdir = $GC->getValue("PORTDIR"), 'getValue("PORTDIR") worked' );
37
38 $GC->getAvailableEbuilds($portdir,'gnustep-base');
39 # Test getting the contents of a directory
40 ok( $GC->{packagelist}, 'Grabbed gnustep-base' );
41
42 $GC->{portage_categories} = [ "gnustep-base" ];
43 $GC->getAvailableVersions($portdir);
44 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 ok($ebuild, '$ebuild has value');
49 ok($GC->{ebuilds}{portage_lc}{$ebuild}, '$ebuild has version');
50 }
51 foreach my $ebuild (keys %{$GC->{ebuilds}{portage}} ) {
52 ok($GC->{ebuilds}{portage}{$ebuild}{name}, "$ebuild name check");
53 ok($GC->{ebuilds}{portage}{$ebuild}{category}, "$ebuild category check");
54 }

  ViewVC Help
Powered by ViewVC 1.1.20