change project structure
This commit is contained in:
27
test/data/common.sh
Executable file
27
test/data/common.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
ScriptFullname=$(readlink -e "$0")
|
||||
ScriptName=$(echo "$ScriptFullname" | awk -F '/' '{print $NF;}')
|
||||
ScriptDir=$(dirname "$ScriptFullname")
|
||||
Multini="$1"
|
||||
InDir="$ScriptDir/in_ini"
|
||||
InIni="$InDir/$ScriptName.ini"
|
||||
OutDir="$ScriptDir/out_ini"
|
||||
OutIni="$OutDir/$ScriptName.ini"
|
||||
ExpectedIni="$ScriptDir/expected_ini/$ScriptName.ini"
|
||||
|
||||
if [[ ! -d "$OutDir" ]]; then
|
||||
mkdir -p "$OutDir"
|
||||
fi
|
||||
|
||||
rm -f "$OutIni"
|
||||
|
||||
function compare ()
|
||||
{
|
||||
if ! cmp -s "$OutIni" "$ExpectedIni" ; then
|
||||
diff "$OutIni" "$ExpectedIni"
|
||||
return 1
|
||||
fi
|
||||
rm -f "$OutIni"
|
||||
return 0
|
||||
}
|
20
test/data/expected_ini/test_add_keyval.sh.ini
Normal file
20
test/data/expected_ini/test_add_keyval.sh.ini
Normal file
@ -0,0 +1,20 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
Key3 = 3
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
20
test/data/expected_ini/test_add_keyval_existing.sh.ini
Normal file
20
test/data/expected_ini/test_add_keyval_existing.sh.ini
Normal file
@ -0,0 +1,20 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
Key = 4
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
21
test/data/expected_ini/test_add_section.sh.ini
Normal file
21
test/data/expected_ini/test_add_section.sh.ini
Normal file
@ -0,0 +1,21 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
||||
|
||||
[NewSection]
|
18
test/data/expected_ini/test_del_key.sh.ini
Normal file
18
test/data/expected_ini/test_del_key.sh.ini
Normal file
@ -0,0 +1,18 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
16
test/data/expected_ini/test_del_key_multiple.sh.ini
Normal file
16
test/data/expected_ini/test_del_key_multiple.sh.ini
Normal file
@ -0,0 +1,16 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
18
test/data/expected_ini/test_del_keyval.sh.ini
Normal file
18
test/data/expected_ini/test_del_keyval.sh.ini
Normal file
@ -0,0 +1,18 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
17
test/data/expected_ini/test_del_section.sh.ini
Normal file
17
test/data/expected_ini/test_del_section.sh.ini
Normal file
@ -0,0 +1,17 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithoutNewLineBefore]
|
1
test/data/expected_ini/test_get_key.sh.ini
Normal file
1
test/data/expected_ini/test_get_key.sh.ini
Normal file
@ -0,0 +1 @@
|
||||
Some Value2 And Tabs!
|
3
test/data/expected_ini/test_get_key_multiple.sh.ini
Normal file
3
test/data/expected_ini/test_get_key_multiple.sh.ini
Normal file
@ -0,0 +1,3 @@
|
||||
1
|
||||
2
|
||||
3
|
0
test/data/expected_ini/test_get_keyval.sh.ini
Normal file
0
test/data/expected_ini/test_get_keyval.sh.ini
Normal file
7
test/data/expected_ini/test_get_section.sh.ini
Normal file
7
test/data/expected_ini/test_get_section.sh.ini
Normal file
@ -0,0 +1,7 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
5
test/data/expected_ini/test_get_section_list.sh.ini
Normal file
5
test/data/expected_ini/test_get_section_list.sh.ini
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
SimpleSection
|
||||
MultipleKeySection
|
||||
SectionWithIndent
|
||||
SectionWithoutNewLineBefore
|
17
test/data/expected_ini/test_set_keyval.sh.ini
Normal file
17
test/data/expected_ini/test_set_keyval.sh.ini
Normal file
@ -0,0 +1,17 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = onlyone
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_add_keyval.sh.ini
Normal file
19
test/data/in_ini/test_add_keyval.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_add_keyval_existing.sh.ini
Normal file
19
test/data/in_ini/test_add_keyval_existing.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_add_section.sh.ini
Normal file
19
test/data/in_ini/test_add_section.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_del_key.sh.ini
Normal file
19
test/data/in_ini/test_del_key.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_del_key_multiple.sh.ini
Normal file
19
test/data/in_ini/test_del_key_multiple.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_del_keyval.sh.ini
Normal file
19
test/data/in_ini/test_del_keyval.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_del_section.sh.ini
Normal file
19
test/data/in_ini/test_del_section.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_get_key.sh.ini
Normal file
19
test/data/in_ini/test_get_key.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_get_key_multiple.sh.ini
Normal file
19
test/data/in_ini/test_get_key_multiple.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_get_keyval.sh.ini
Normal file
19
test/data/in_ini/test_get_keyval.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_get_section.sh.ini
Normal file
19
test/data/in_ini/test_get_section.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_get_section_list.sh.ini
Normal file
19
test/data/in_ini/test_get_section_list.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
19
test/data/in_ini/test_set_keyval.sh.ini
Normal file
19
test/data/in_ini/test_set_keyval.sh.ini
Normal file
@ -0,0 +1,19 @@
|
||||
# comment
|
||||
; comment again
|
||||
|
||||
DefKey1 = Some Value1
|
||||
DefKey2 = Some Value2 And Tabs! # With Comment
|
||||
DefKey3=NoSpaces!
|
||||
|
||||
[SimpleSection] # Comment For Section
|
||||
Key1 = 1
|
||||
Key2 = 2
|
||||
|
||||
[MultipleKeySection]
|
||||
Key = 1
|
||||
Key = 2
|
||||
Key = 3
|
||||
|
||||
[SectionWithIndent]
|
||||
Key=Value
|
||||
[SectionWithoutNewLineBefore]
|
7
test/data/test_add_keyval.sh
Executable file
7
test/data/test_add_keyval.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --add "$InIni" SimpleSection Key3 3
|
||||
|
||||
compare
|
7
test/data/test_add_keyval_existing.sh
Executable file
7
test/data/test_add_keyval_existing.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --add "$InIni" MultipleKeySection Key 4
|
||||
|
||||
compare
|
7
test/data/test_add_section.sh
Executable file
7
test/data/test_add_section.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --add "$InIni" NewSection
|
||||
|
||||
compare
|
7
test/data/test_del_key.sh
Executable file
7
test/data/test_del_key.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --del "$InIni" SimpleSection Key1
|
||||
|
||||
compare
|
7
test/data/test_del_key_multiple.sh
Executable file
7
test/data/test_del_key_multiple.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --del "$InIni" MultipleKeySection Key
|
||||
|
||||
compare
|
7
test/data/test_del_keyval.sh
Executable file
7
test/data/test_del_keyval.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --del "$InIni" MultipleKeySection Key 2
|
||||
|
||||
compare
|
7
test/data/test_del_section.sh
Executable file
7
test/data/test_del_section.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --del "$InIni" SectionWithIndent
|
||||
|
||||
compare
|
7
test/data/test_get_key.sh
Executable file
7
test/data/test_get_key.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini --get "$InIni" '' DefKey2 > "$OutIni"
|
||||
|
||||
compare
|
7
test/data/test_get_key_multiple.sh
Executable file
7
test/data/test_get_key_multiple.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini --get "$InIni" MultipleKeySection Key > "$OutIni"
|
||||
|
||||
compare
|
7
test/data/test_get_keyval.sh
Executable file
7
test/data/test_get_keyval.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini --get "$InIni" MultipleKeySection Key 3 > "$OutIni"
|
||||
|
||||
compare
|
7
test/data/test_get_section.sh
Executable file
7
test/data/test_get_section.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini --get "$InIni" '' > "$OutIni"
|
||||
|
||||
compare
|
7
test/data/test_get_section_list.sh
Executable file
7
test/data/test_get_section_list.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini --get "$InIni" > "$OutIni"
|
||||
|
||||
compare
|
7
test/data/test_set_keyval.sh
Executable file
7
test/data/test_set_keyval.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "common.sh"
|
||||
|
||||
$Multini -o "$OutIni" --set "$InIni" MultipleKeySection Key onlyone
|
||||
|
||||
compare
|
29
test/run_test.sh
Executable file
29
test/run_test.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEF='\e[0m'; BLD='\e[1m'; RED='\e[31m'; GRN='\e[32m'; WHT='\e[97m'
|
||||
ScriptFullname=$(readlink -e "$0")
|
||||
ScriptName=$(echo "$ScriptFullname" | awk -F '/' '{print $NF;}')
|
||||
ScriptDir=$(dirname "$ScriptFullname")
|
||||
TestDir="$ScriptDir/tests"
|
||||
Multini=$(readlink -e "$1")
|
||||
|
||||
if [[ -z "$Multini" ]]; then
|
||||
Multini="$ScriptDir/multini"
|
||||
fi
|
||||
|
||||
RetCode=0
|
||||
pushd "$TestDir" > /dev/null
|
||||
while read Test
|
||||
do
|
||||
echo -ne "${BLD}${WHT}[----]${DEF} $Test"
|
||||
Errors=$("$TestDir/$Test" "$Multini")
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo -e "\r${BLD}${WHT}[${RED}FAIL${WHT}]${DEF} $Test"
|
||||
RetCode=1
|
||||
echo "$Errors"
|
||||
else
|
||||
echo -e "\r${BLD}${WHT}[${GRN} OK ${WHT}]${DEF} $Test"
|
||||
fi
|
||||
done < <(find "$TestDir" -type f -name 'test_*.sh' -printf "%f\n")
|
||||
popd > /dev/null
|
||||
exit "$RetCode"
|
Reference in New Issue
Block a user