File: testConfigContinuation

package info (click to toggle)
gnump3d 2.9.3-1sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,420 kB
  • ctags: 366
  • sloc: perl: 10,649; sh: 188; makefile: 147
file content (41 lines) | stat: -rwxr-xr-x 694 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl 
# Test that lines may be continued within the configuration file.

use strict;                # Standard safety checks.
use gnump3d::config;       # My configuration file reading module.

#
# Read in a pre-created configuration file.
my $file = "testConfigContinuation.data";
&readConfig( $file );

# 
#  Ensure the file contains a split value
#
if ( &getConfig( "split_value" ) ne "read_ok" )
{
    exit 1;
}

if ( &getConfig( "directory_foo_format" ) ne "steve_kemp" )
{
    exit 1;
}

if ( &getConfig( "foo_bar" ) ne "baz" )
{
    exit 1;
}


#
#  Ensure a missing key isn't found.
#
my %HASH = &getHash();
if ( defined( $HASH{"non-present-key"} ) )
{
    exit;
}


exit 0;