diff options
author | M.Gergő | 2020-05-13 19:49:38 +0200 |
---|---|---|
committer | M.Gergő | 2020-05-13 19:49:38 +0200 |
commit | 802157d15c9d0adc37621c4f32ed8083dcaf8303 (patch) | |
tree | 9d9dfe1ef27b2e49112435d645ebe48575318200 /tests/test.ini | |
parent | 1ed4114bb3b9e701dcf6b2d8f1c6da2b47979d4d (diff) | |
download | lightconfini-802157d15c9d0adc37621c4f32ed8083dcaf8303.tar.gz lightconfini-802157d15c9d0adc37621c4f32ed8083dcaf8303.zip |
INI example
Diffstat (limited to 'tests/test.ini')
-rw-r--r-- | tests/test.ini | 135 |
1 files changed, 79 insertions, 56 deletions
diff --git a/tests/test.ini b/tests/test.ini index c7094a5..a7706c3 100644 --- a/tests/test.ini +++ b/tests/test.ini @@ -1,56 +1,79 @@ - - -# Comments can be '#' or ';' - -;Global variables are allowed -global1 = 11 -global2 = aaa - -; The First character of Section or Parameter name should be alphanumerical, -; another caharacters can ba Alphanumerical or dot(.)/underscore(_)/hyphen(-) -[Sections.are_ASCII-characters] - -; Parameter values, withourt double quotation mark (") -; ban be like Sections! -parameter_names.also-ASCII = first.value-like_ascii - -; For value characters, the Space, or any other special character allowed only between two double-quotation-mark sign. -; Escaped characters, (\n, \t, etc.) or multi-byte characters (é, €, カ, ⠋, ঘঃ, 😍) are allowed here. -parameter2 = "I like \t emojis 😍 but, don't like mosquitoes カ ! :)" - -; Even! -parameter3 = "With double quotation mark \ -I can write multiline values, but I shoud \ -escapse the trailing newline with '\' sign!" - - [A B€BCD] -ghijkl=val1 ; komment -ghijkl = val2 ;kom1 -ghijkl = val3;kom3 - ghijkl=val14;kom14 - ghijkl = val15;kom15 - ghijkl = val4;kom11 - -eee = -fff= -aa= -#commt ---- ;#//sdfsdf// -[é] -aaa=bbb -cc="=dd" - [test2];#coment -ggg = aaa #commnta -;ad = "123456\ -; aléásdasd #;--Ł$ -;wqeweq \ -;aabcd=efgh " - - ;fghfgh -#####; -;abcdefghijklmnopqrst -;;;; -### Test confi\ng -abc= - ;. - +
+
+;Comments are started with '#' or ';'
+; Inline comments are allowed.
+; EMPTY/BLANK lines are not processed!
+
+;Global variables are allowed
+# Parameters without section are global variables.
+global1 = 11
+global2 = aaa
+
+; The First character of Section name should be alphanumerical, but
+# another caharacters can be Alphanumerical or dot(.)/underscore(_)/hyphen(-)/space(' ')
+[Sections.are_ASCII-alnum characters]
+
+;Parameter values in itself:
+# can be ASCII Alphanumerical only, without any SPACE or TAB character.
+# Should start with alphanumerical, and from the second character,
+# can contain (with dot(.) or underscore(_) or hyphen(-))
+# If you want to use other characters, you should enclose them between two double-quotation-mark(") sign.
+parameter = value-in_itself-are-Alnum.ascii
+
+;Parameter names are ASCII alphanumerical only, with additional dot(.) or underscore(_) or hyphen(-) or suare-bracket([/]) characters.
+# Square-brackets([/]) are allowed for arrays.
+parameter_names.also-ASCII = value
+
+[Section 2]
+;For other value characters:
+# The Space, or any other special characters are allowed only between two double-quotation-mark sign.
+# Escaped characters, (\n, \t, etc.) or multi-byte characters (é, €, カ, ⠋, ঘঃ, 😍) are allowed here.
+parameter2 = "I like \t emojis 😍 but, don't like mosquitoes カ ! :)"
+
+; Even! Multiline Parameters are supported:
+parameter3 = "With double quotation mark \
+I can write multiline values, but I shoud \
+escapse the trailing newline with '\' sign!"
+
+
+
+
+[E X A M P L E S] ;comment #OK
+
+abcdefgh ;WRONG
+abcdefgh = ;CORRECT
+abcdefgh == ;WRONG
+abcdefgh = "==" ;CORRECT
+=abcd ;ERROR
+= ;xxxx ;ERROR
+
+param=value;inline_comment #OK
+ param = value #OK
+param = value1 value2 #ERROR
+param = value1\ value2 #ERROR
+paramß = value1_value2 #ERROR
+
+ [example ;section] #WRONG
+[example \;section] #WRONG
+
+ param = "qwerty \"qwerty\" abcdefh " ;CORRECT
+ param = "qwerty"qwerty ;WRONG
+ param = "qwerty" ;OK
+
+ array[0123] = "asdasd" #OK
+ array [1234] = dfgdfg #WRONG
+ array[_] = "jkljkl" #OK
+ array[abc] = aaaa #OK
+ array.abc = aaaa #OK
+ array[abc] = "" #OK
+
+#### qwerty $ۧ qwerty #### ;OK
+
+test = -1.1 #OK
+test2 = "-1.1" #OK
+test3 = _aaa #WRONG
+test4 = .aaa #WRONG
+test5 = aa.a #OK
+ip = 127.0.0.1 #OK
+ip = "127.0.0.1" #OK
+
|