1 # Tests for configuration parser
3 Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{int1=23; long1=1234567812345678; long2=4321; str1="s1"; str2="s2"}' 'sec1 {#int1; ##long1; -str1; str2; #int2=123; ##long2=1234; #int3=0x10; #int4; $dbl1=001.100; $dbl2}; sec2{str3}'
5 CF_sec1_long1='1234567812345678'
15 Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{list1 1 a1 b1; list1:clear; list1 2 a2 b2 3 a3 b3}' 'sec1 {@list1 {#int1; str1; -str2}}'
16 Out: CF_sec1_list1_int1[1]='2'
17 CF_sec1_list1_str1[1]='a2'
18 CF_sec1_list1_int1[2]='3'
19 CF_sec1_list1_str1[2]='a3'
21 Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{ar1 a b c d; ar1 a b c; ar2 1 2; ar3 1.1}' 'sec1 {ar1[]; #ar2[2]; $ar3[-2]}'
22 Out: CF_sec1_ar1[1]='a'
29 Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{list1 {str1=1; list2=a b c}; list1 {str1=2; list2=d e}}' 'sec1 {@list1 {str1; @list2{str2}}}'
30 Out: CF_sec1_list1_str1[1]='1'
31 CF_sec1_list1_list2_str2[1]='a'
32 CF_sec1_list1_list2_str2[2]='b'
33 CF_sec1_list1_list2_str2[3]='c'
34 CF_sec1_list1_str1[2]='2'
35 CF_sec1_list1_list2_str2[4]='d'
36 CF_sec1_list1_list2_str2[5]='e'
38 Run: ../obj/ucw/shell/config -C/dev/null 'sec{str=a'\''b"c'\''d"\\e'\''f"g}'
39 Out: CF_sec_str='ab"cd\e'\''fg'