Advanced-Config
view release on metacpan or search on metacpan
t/28-sensitive_tests.t view on Meta::CPAN
#!/usr/bin/perl
# -----------------------------------------------------
# This test case checks if this module thinks the
# specified tags are sensitive or not.
# Sensitive values are not written to fish.
# It doesn't validate any tag's value!
# It tests out all the chk_if_*() functions!
# -----------------------------------------------------
use strict;
use warnings;
use Test::More;
use File::Basename;
use File::Spec;
use Sys::Hostname;
use Fred::Fish::DBUG 2.09 qw / on /;
use Fred::Fish::DBUG::Test 2.09;
# How to find the helper module ...
BEGIN { push (@INC, File::Spec->catdir (".", "t", "test-helper")); }
use helper1234;
my $fish;
BEGIN {
$fish = turn_fish_on_off_for_advanced_config ();
unlink ( $fish );
DBUG_ENTER_FUNC ();
use_ok ("Advanced::Config");
DBUG_VOID_RETURN ();
}
END {
DBUG_ENTER_FUNC ();
# Don't do any tests in the END block ...
DBUG_VOID_RETURN ();
}
# --------------------------------------
# Start of the main program!
# --------------------------------------
{
# Turn fish on ...
DBUG_PUSH ( $fish );
DBUG_ENTER_FUNC (@ARGV);
dbug_ok (1, "In the MAIN program ..."); # Test # 2 ...
# Make this extra pattern sensitive!
Advanced::Config::Options::make_it_sensitive ("1111", "zork", "22222");
my $file = File::Spec->catfile ("t", "config", "28-sensitive.cfg");
my $cfg1 = make_object ( $file );
my $cfg2 = make_object ( $file, "disable_variables" => 1 );
my $cfg3 = make_object ( $file, "disable_decryption" => 1 );
# Doesn't work after the config files are loaded ..
Advanced::Config::Options::make_it_sensitive ("pork");
( run in 0.543 second using v1.01-cache-2.11-cpan-39bf76dae61 )