Advanced-Config

 view release on metacpan or  search on metacpan

t/config/30-alt_symbol_control.cfg  view on Meta::CPAN

#         Spaces are allowed in the file name, but they must all reside in
#         the "t/config" directory.
#
# Special case option:
#         There are some special tags that ARE NOT a "Read Option".  These tags
#         all begin 'section_test_'.
#
#         When such tag(s) appear, it's an instruction to compare just that
#         one section of the config file to the template.  Everything else
#         outside that section is ignored.
#
#         So if you only have one section to compare, use "section_test_01".
#         If you have multiple sections to compare use "section_test_01",
#         "section_test_02", etc.
#
#         So say section_test_01 = "abc", then it looks up tag "abc" in the
#         referenced config file for the name of the section to use.  Done like
#         this since part of the tests were to use long messy section names
#         and this avoided tests failing due to typos.
#
#         Please note that sections of the same name are merged together and
#         I want to be able to validate that muliple sections map correctly.
#         
# ==========================================================================
#
# NOTE:   The template file does not use sections!  So when compared to a
#         config file with sections, it only compares the current section in
#         the target config file.  All other sections will be ignored.
#
#         If you don't use one of the special tags, it will only compare against
#         the default main section.
#
# ==========================================================================
#
# Please note that the test program does 3 tests per section:
#    1)   After the initial load ...
#    2)   After the 1st forced refresh ...
#    3)   After the 2nd forced refresh ...
#
# ==========================================================================
# Keep the sections in this config file sorted.  This is the order that
# the test program will process things.
# ==========================================================================


# Tells how many config files the test program is expecting to process.
number_test_files = 11


# ---------------------------------------------------------------------
# Test against itself ...

[ 10-simple.cfg ]
croak          = 2        # Call die if it doesn't parse correctly.

# ---------------------------------------------------------------------

[ 30-alt_symbols_01.cfg ]
assign         = ==
comment        = :
variable_left  = '$['     # $[..] for variable substitution
variable_right = ']'
quote_left     = '^'      # ^..^  for balanced quotes
quote_right    = '^'
croak          = 2        # Call die if it doesn't parse correctly.

# ---------------------------------------------------------------------

[ 30-alt_symbols_02.cfg ]
assign         = ==
comment        = =
variable_left  = '%'      # %..% for variable substitution
variable_right = '%'
quote_left     = '<'      # <..> for balanced quotes
quote_right    = '>'
croak          = 2

# ---------------------------------------------------------------------

[ 30-alt_symbols_03.cfg ]
assign         = :=
comment        = ?
variable_left  = '$['    # $[..] for variable substitution
variable_right = ']'
quote_left     = '@'     # @..@  for balanced quotes ...
quote_right    = '@'
croak          = 2

# Defines the tag to look up in the config file for the section name to use.
section_test_01 = section_03

# ---------------------------------------------------------------------

[ 30-alt_symbols_04 multi section test.cfg ]
assign = ~
comment = CMT:
variable_left  = '$<'     # $<..> for variable substitution
variable_right = '>'
quote_left     = "'"      # '..' for balanced quotes
quote_right    = "'"
section_left   = '{'
section_right  = '}'
croak          = 2

section_test_01 = section_01
section_test_02 = section_02

# ---------------------------------------------------------------------

[ 30-alt_symbols_05 space assign.cfg ]
assign         = \s       # Special case of space separated tag/values 
comment        = :
variable_left  = '$['     # $[..] for variable substitution
variable_right = ']'
quote_left     = '^'      # ^..^  for balanced quotes
quote_right    = '^'
croak          = 2        # Call die if it doesn't parse correctly.

# =====================================================================

[ 30-alt_symbols_70 merge multiple files.cfg ]
source_cb = "main::ALTER_SOURCE_CALLBACK_OPTIONS"
croak     = 2

section_test_01 = section_03
section_test_02 = section_01
section_test_03 = section_02

# ---------------------------------------------------------------------
# Simulates test # 70 using calls to merge_config() instead of
# directly sourcing in the extra file from the original config file.

[ 30-alt_symbols_71_empty.cfg ]
croak = 2

section_test_01 = section_03
section_test_02 = section_01
section_test_03 = section_02

# ---------------------------------------------------------------------
# Like test # 71, except that it calls merge_config() multiple times
# per config file referenced.

[ 30-alt_symbols_72_empty.cfg ]
croak = 2

section_test_01 = section_03
section_test_02 = section_01
section_test_03 = section_02

# ---------------------------------------------------------------------

[ 30-alt_symbols_80_overlap.cfg ]
croak = 2

section_test_01 = control.main
section_test_02 = control.duplicate
section_test_03 = control.variable

# ---------------------------------------------------------------------

[ 30-alt_symbols_81_merge_same_file.cfg ]
source_cb = "main::ALTER_SOURCE_CALLBACK_OPTIONS"
croak = 2

section_test_01 = control.main
section_test_02 = control.duplicate
section_test_03 = control.variable
section_test_04 = control.one
section_test_05 = control.two
section_test_06 = control.three
section_test_07 = control.four



( run in 2.643 seconds using v1.01-cache-2.11-cpan-364913b4093 )