/[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 54 - (show annotations) (download) (as text)
Wed May 10 16:15:56 2006 UTC (8 years, 6 months ago) by mcummings
File MIME type: text/troff
File size: 1621 byte(s)
Moved Ebuild.pm to Portage.pm
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
35 # Can we get the PORTDIR value?
36 ok( $GC->getValue("PORTDIR"), 'getValue("PORTDIR") worked' );
37
38 $GC->getAvailableEbuilds('gnustep-base');
39 # Test getting the contents of a directory
40 ok( $GC->{packagelist}, 'Grabbed gnustep-base' );
41 $GC->{portage_categories} = [ "gnustep-base" ];
42 $GC->getAvailableVersions();
43 ok( $GC->{modules}, 'Digested available versions' );
44 ok( $GC->{modules}{portage_lc}, 'Portage_lc check' );
45 ok( $GC->{modules}{portage_lc_realversion}, 'Digested available versions' );
46 ok( $GC->{modules}{portage}, 'Digested available versions' );
47 foreach my $ebuild (keys %{$GC->{moduels}{portage_lc}} ) {
48 ok($ebuild, '$ebuild has value');
49 ok($GC->{modules}{portage_lc}{$ebuild}, '$ebuild has version');
50 }
51 foreach my $ebuild (keys %{$GC->{modules}{portage}} ) {
52 ok($GC->{modules}{portage}{$ebuild}{name}, "$ebuild name check");
53 ok($GC->{modules}{portage}{$ebuild}{category}, "$ebuild category check");
54 }

  ViewVC Help
Powered by ViewVC 1.1.20