WSL/SLF GitLab Repository

run_tests.sh 737 Bytes
Newer Older
1
2
#!/bin/bash

3
#Run INIshell unit tests.
4
#https://gitlabext.wsl.ch/snow-models/inishell
5

Michael Reisecker's avatar
Michael Reisecker committed
6
../bin/inishell --version
7
echo -e "*** Starting INIshell. This is its output:\n"
Michael Reisecker's avatar
Michael Reisecker committed
8
../bin/inishell -i unit_test_inireader.ini -o unit_test_inireader_output.ini AAA::delete="" NEW::new_key=new_value --exit
9
10

difference=$(diff "unit_test_inireader_output.ini" "unit_test_inireader_expected_result.ini")
buergiss's avatar
buergiss committed
11
return_code=$(echo "$?")
12
if [ -z "$difference" ]; then
13
      echo  "*** All ok for the INI parser."
14
15
16
else
      echo "[E] The ini reader did not produce the expected result! Difference:"
      echo "$difference"
17
      echo "[i] NOTE: Make sure you have set whitespace handling to 'USER' in INIshell's settings!"
18
fi
19

20
echo "*** All done"
buergiss's avatar
buergiss committed
21
exit $return_code