Permalink
Browse files

Merge branch 'fix_issue4'

* fix_issue4:
  fix, last line without newline was ignored if (issue #4)
  add test case "no newline at the end of file" (issue #4)
  • Loading branch information...
2 parents 9eded6d + 860385e commit daf1fd3cb508e595b64c1e234d0a65b687754384 @rudimeier committed Mar 5, 2013
Showing with 5 additions and 4 deletions.
  1. +1 −1 read_ini.sh
  2. +2 −2 test/test1.ini
  3. +1 −0 test/test1.out.correct
  4. +1 −1 test/test1.sh
View
@@ -168,7 +168,7 @@ function read_ini()
local SWITCH_SHOPT=""
pollute_bash
- while read -r line
+ while read -r line || [ -n "$line" ]
do
#echo line = "$line"
View
@@ -36,5 +36,5 @@ var8 = VAR ' 8
; var10 - leading whitespace before variable name
var10 = VAR 10
-
-
+; var11 - no newline at the end of file
+var11 = VAR 11
@@ -8,3 +8,4 @@ var7:VAR " 7
var8:VAR ' 8
var9:VAR 9
var10:VAR 10
+var11:VAR 11
View
@@ -18,4 +18,4 @@ echo "var7:$INI__var7"
echo "var8:$INI__var8"
echo "var9:$INI__var9"
echo "var10:$INI__var10"
-
+echo "var11:$INI__var11"

0 comments on commit daf1fd3

Please sign in to comment.