WSL/SLF GitLab Repository

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

3
#Run INIshell unit tests.
Michael Reisecker's avatar
Michael Reisecker committed
4
#models.slf.ch/p/inishell-ng
5

6
printf "*** Building...\n"
7
cd ..
8
9
make >> /dev/null
printf " done\n\n"
10
cd tests
11

12
13
../build/inishell --version
echo -e "*** Starting INIshell. This is its output:\n"
14
../build/inishell -i unit_test_inireader.ini -o unit_test_inireader_output.ini AAA::delete="" NEW::new_key=new_value --exit
15
16
17

difference=$(diff "unit_test_inireader_output.ini" "unit_test_inireader_expected_result.ini")
if [ -z "$difference" ]; then
18
      echo  "*** All ok for the INI parser."
19
20
21
else
      echo "[E] The ini reader did not produce the expected result! Difference:"
      echo "$difference"
22
      echo "[i] NOTE: Make sure you have set whitespace handling to 'USER' in INIshell's settings!"
23
fi
24

25
echo "*** All done"