Skip to content

Commit

Permalink
Add test case for colon in value
Browse files Browse the repository at this point in the history
Adds a test case for a colon in a value

Change-Id: Ica56b8af5fa59a008cfe96424b1d3e17fd6cf7d6
  • Loading branch information
kevinbenton committed Oct 14, 2014
1 parent a7eb07a commit e0d6a46
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/test_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ drivers = driver=python.import.path.Driver
[[test6|test-strip.conf]]
[DEFAULT]
# next line has trailing space
attr = strip_trailing_space
attr = strip_trailing_space
[[test7|test-colon.conf]]
[DEFAULT]
servers=10.11.12.13:80
EOF

echo -n "get_meta_section_files: test0 doesn't exist: "
Expand Down Expand Up @@ -267,5 +271,14 @@ EXPECT_VAL="
attr = strip_trailing_space"
check_result "$VAL" "$EXPECT_VAL"

rm -f test.conf test1c.conf test2a.conf test-quote.conf test-space.conf test-equals.conf test-strip.conf
echo -n "merge_config_file test7 colon in value: "
rm -f test-colon.conf
merge_config_file test.conf test7 test-colon.conf
VAL=$(cat test-colon.conf)
EXPECT_VAL="
[DEFAULT]
servers = 10.11.12.13:80"
check_result "$VAL" "$EXPECT_VAL"

rm -f test.conf test1c.conf test2a.conf test-quote.conf test-space.conf test-equals.conf test-strip.conf test-colon.conf
rm -rf test-etc

0 comments on commit e0d6a46

Please sign in to comment.