/[cwmp]/google/trunk/t/07-tree.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /google/trunk/t/07-tree.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 112 - (show annotations)
Fri Oct 26 11:42:39 2007 UTC (16 years, 7 months ago) by dpavlin
File MIME type: application/x-troff
File size: 940 byte(s)
reorg source code tree to make trunk
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my $debug = shift @ARGV;
6
7 use Test::More tests => 6;
8 use Data::Dump qw/dump/;
9 use lib 'lib';
10
11 BEGIN {
12 use_ok('CWMP::Tree');
13 }
14
15 #use Cwd qw/abs_path/;
16 #ok(my $abs_path = abs_path($0), "abs_path");
17 #$abs_path =~ s!/[^/]*$!/!; #!fix-vim
18
19 ok( my $obj = CWMP::Tree->new({
20 debug => $debug,
21 }), 'new' );
22 isa_ok( $obj, 'CWMP::Tree' );
23
24 my @perl = qw/
25 {'InternetGatewayDevice'}->{'DeviceInfo'}->{'HardwareVersion'}
26 {'InternetGatewayDevice'}->{'DeviceInfo'}->{'VendorConfigFile'}->[1]->{'Date'}
27 {'InternetGatewayDevice'}->{'Services'}->{'VoiceService'}->[1]->{'PhyInterface'}->[2]->{'PhyPort'}
28 /;
29
30 foreach my $name ( qw/
31 InternetGatewayDevice.DeviceInfo.HardwareVersion
32 InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Date
33 InternetGatewayDevice.Services.VoiceService.1.PhyInterface.2.PhyPort
34 / ) {
35 my $expect = shift @perl;
36 cmp_ok( $obj->name2perl( $name ), 'eq', $expect, "name2perl( $name )" );
37 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26