1
# Before `make install' is performed this script should be runnable with
2
# `make test'. After `make install' it should work as `perl test.pl'
4
#########################
6
# change 'tests => 1' to 'tests => last_test_to_print';
9
BEGIN { plan tests => 18 };
11
ok(1); # If we made it this far, we're ok.
13
#########################
15
# Insert your test code below, the Test module is use()ed here so read
16
# its man page ( perldoc Test ) for help writing this test script.
19
open OUT, ">test.config" or die $!;
22
my $c = Config::Auto::parse("test.config");
29
search oucs.ox.ac.uk ox.ac.uk
32
nameserver 129.67.1.180
35
ok(ref ($c->{nameserver}) eq "ARRAY");
36
ok($c->{nameserver}[0] eq "163.1.2.1");
37
ok(ref ($c->{search}) eq "ARRAY");
40
root:x:0:0:root:/root:/bin/bash
41
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
42
bin:x:2:2:bin:/bin:/bin/sh
45
ok(ref($c->{root}) eq "ARRAY");
46
ok($c->{root}[0] eq "x");
49
# This file was generated by debconf automaticaly.
50
# Please use dpkg-reconfigure to edit.
51
# And you can copy this file to ~/.mozillarc to override.
56
ok($c->{MOZILLA_DSP} eq "auto");
61
# Example configuration of GNU Name Service Switch functionality.
62
# If you have the `glibc-doc' and `info' packages installed, try:
63
# `info libc "Name Service Switch"' for information about this file.
72
ok($c->{passwd} eq "compat");
73
ok(ref $c->{hosts} eq "ARRAY");
82
ok($c->{quux} eq "zoop");
83
ok(ref $c->{test} eq "HASH");
84
ok($c->{test}{foo} eq "bar");
85
ok($c->{test}{baz} == 1);
89
host = proxy.some-domain-name.com
95
ok(ref $c->{"group1"} eq "HASH");
96
ok($c->{"group1"}{"host"} eq "proxy.some-domain-name.com");
97
ok($c->{"group1"}{"port"} eq "80");
98
ok($c->{"group1"}{"username"} eq "blah");
99
ok($c->{"group1"}{"password"} eq "doubleblah");