~ubuntu-branches/ubuntu/natty/libconfig-inifiles-perl/natty

« back to all changes in this revision

Viewing changes to t/08group.t

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2010-10-16 17:21:21 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101016172121-hfha61qoyx5o0mk4
Tags: 2.58-1
* New upstream release.
* Stop using svn-upgrade in watch file.
* Use source format 3.0 (quilt), and ease building with
  git-buildpackage: Git-ignore quilt .pc dir, and add source
  local-options.
* Drop locally included CDBS snippets, and local implementation of
  DEB_MAINTAINER_MODE, all included in main cdbs now.
* Ease backporting to Debian stable: Relax inclusion of CDBS snippets
  required only in DEB_MAINTAINER_MODE, and suppress related build-
  dependencies.
* Extend copyright years in rules file, and refer to FSF website (not
  postal address).
* Rewrite copyright file using draft rev135 of DEP5 format.
* Bump Policy compliance to standards-version 3.9.1.
* Shorten Vcs-* stanzas.
* Update DEB_UPSTREAM_URL, to fix get-orig-source rule.
* Build-depend on libtest-simple-perl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
1
3
use strict;
2
 
use Test;
 
4
use warnings;
 
5
 
 
6
use Test::More tests => 1;
 
7
 
3
8
use Config::IniFiles;
4
 
# $Id: 08group.t,v 1.4 2002-08-15 21:34:00 wadg Exp $
5
 
 
6
 
BEGIN { plan tests => 1 }
7
 
 
8
 
# Get files from the 't' directory, portably
9
 
chdir('t') if ( -d 't' );
10
 
 
11
 
my $ini = Config::IniFiles->new( -file => 'test.ini' );
 
9
 
 
10
use lib "./t/lib";
 
11
 
 
12
use Config::IniFiles::TestPaths;
 
13
 
 
14
my $ini = Config::IniFiles->new( -file => t_file('test.ini') );
12
15
my $members;
13
16
 
14
17
# Test 1
15
18
# Group members with spaces
16
19
 
17
 
$members = join " ", $ini->GroupMembers("group");
18
 
ok($members eq "group member one group member two group member three");
 
20
# TEST
 
21
is_deeply(
 
22
    [$ini->GroupMembers("group")],
 
23
    ["group member one", "group member two", "group member three"],
 
24
    "Group members with spaces",
 
25
);
19
26
 
20
27
# Test 2
21
28
# Adding a new section - updating groups list