Advanced-Config
view release on metacpan or search on metacpan
t/config/13-alt-get-tests.cfg view on Meta::CPAN
int_three = 5|9|11
int_four = 5 2 12 9 22 55 -1 -4
real_one = 1.0
real_two = 2.2 3.3
real_three = 5.1? 9? 11.1
real_four = 5.1 2 12.1 9 22.5 55.5 -0.4 -5.5
real_1 = 0.1 # Good
real_2 = .1 # Good - no longer needs a decimal part ...
real_3 = 1. # Good - no longer needs a fraction part ...
realb_4 = x.1 # BAD
realb_5 = 1.x # BAD
realb_6 = . # BAD - don't allow just a decimal point ...
# Failure cases ...
bad_real_one = one
bad_real_two = 1 two
bad_real_three = 1, two, 3.6
bad_real_four = 1.3 two 3.4 four
# ----------------------------------------------------------------------
# Used to test the get_boolean() & get_list_boolean() functions ...
# Format used for tag names: boolean_<test #>_<answer>
# ----------------------------------------------------------------------
boolean_00_0 = # has no value on purpose!
boolean_01_0 = False
boolean_01_1 = True
boolean_02_0 = no
boolean_02_1 = yes
boolean_03_0 = F
boolean_03_1 = t
boolean_04_0 = n
boolean_04_1 = Y
boolean_05_0 = 0
boolean_05_1 = 99
boolean_06_0 = 0
boolean_06_1 = -8
boolean_07_0 = -0
boolean_07_1 = +8
boolean_08_0 = bad
boolean_08_1 = good
boolean_09_0 = 0.0
boolean_09_1 = 0.1
boolean_10_0 = -0.0
boolean_10_1 = 3.1
boolean_11_0 = +0.0
boolean_11_1 = +8.3
boolean_12_0 = ${boolean_05_0}
boolean_12_1 = ${boolean_05_1}
boolean_13_1 = On
boolean_13_0 = Off
boolean_14_0 = o # Ambiguous, so will evalute to false!
boolean_15_0 = .0
boolean_15_1 = .1
# ----------------------------------------------------------------------
# Used to test the get_directory() get_list_directory() functions ...
# ----------------------------------------------------------------------
which0 = log_summary
which1 = log_details
which = ${which${ADVANCED_CONFIG_FISH}:=${which0}}
dir_1 = t
dir_2 = ${dir_1}${sep}config
dir_3 = ${dir_1}${sep}${which}
dir_bad_1 = ${dir_1}${sep}no_such_dir # No such dir or file!
dir_bad_2 = ${dir_2}${sep}13-alt-get-tests.cfg # This config file is not a directory!
dir_list_1 = ${dir_1} ${dir_2} ${dir_3}
dir_list_2 = ${dir_1} ${dir_bad_1} ${dir_3} ${dir_bad_2}
# ----------------------------------------------------------------------
# Used to test the get_filename() get_list_filename() functions ...
# ----------------------------------------------------------------------
file_1 = ${dir_2}${sep}13-alt-get-tests.cfg # This config file!
file_2 = ${dir_2}${sep}10-simple.cfg
file_bad_1 = ${dir_1}${sep}no_such_file.txt # No such dir or file!
file_bad_2 = ${dir_2} # It's a directory, not a file!
file_list_1 = ${file_1} ${file_2} ${file_1}
file_list_2 = ${file_1} ${file_bad_1} ${file_2} ${file_bad_2}
# ----------------------------------------------------------------------
# Used in the Special file/directory tests ...
# ----------------------------------------------------------------------
special_1 = /dev/null # Unix special file/dir name
special_2 = NUL # Windows version of /dev/null
special_3 = ~ # Unix home dir.
special_4 = ~test # Unix home dir for user "test".
special_5 = ~/test # File/dir "test" under my home dir.
# ----------------------------------------------------------------------
# Used to test the get_date() & get_list_date() functions ...
# Format used for tag names: date_<test #>_<answer>
# ----------------------------------------------------------------------
date_000_bad = not a date
date_101_2017-12-25 = December 25th, 2017
date_102_2017-12-24 = December 24th 2017
date_103_2017-12-23 = Dec 23rd 2017
date_104_2017-12-22 = Dec. 22nd 2017
date_105_2017-12-21 = 21-DEC-2017
date_106_2017-12-20 = 12/20/2017
date_107_2017-12-19 = 2017/12/19
date_108_2017-12-18 = 2017-12-18
date_109_2017-12-25 = Monday, December 25, 2017 @ 0:00 # When Santa came.
date_110_2017-12-17 = Sun, 2017-12-17
date_111_2017-12-16 = Sat. 12.16.2017
date_112_2017-12-15 = 12152017
date_113_2017-12-14 = 20171214
date_114_2017-12-25 = ${date_109_2017-12-25}
date_115_2017-12-22 = ${date_104_2017-12-22}
# NOTE: All ambiguous 2-digit dates assume YY/MM/DD by default!
# You can change this by using Get Option: date_format
date_201_2007-12-08 = 07/12/08 # A very ambiguous date! (Assumes YY/MM/DD)
date_202_2007-12-18 = 07/12/18 # A very ambiguous date! (Assumes YY/MM/DD)
date_203_1998-07-12 = 07/12/98 # Not ambiguous at all, it's MM/DD/YY.
date_204_2017-12-18 = 17-12-18 # No issue here, it's YY-MM-DD.
date_205_2017-12-21 = 17-DEC-21 # Hopefully this is obvious.
( run in 0.572 second using v1.01-cache-2.11-cpan-e1769b4cff6 )