Browse code

Add test case for colon in value

Adds a test case for a colon in a value

Change-Id: Ica56b8af5fa59a008cfe96424b1d3e17fd6cf7d6

Kevin Benton authored on 2014/10/14 20:54:42
Showing 1 changed files
... ...
@@ -103,7 +103,11 @@ drivers = driver=python.import.path.Driver
103 103
 [[test6|test-strip.conf]]
104 104
 [DEFAULT]
105 105
 # next line has trailing space
106
-attr = strip_trailing_space 
106
+attr = strip_trailing_space
107
+
108
+[[test7|test-colon.conf]]
109
+[DEFAULT]
110
+servers=10.11.12.13:80
107 111
 EOF
108 112
 
109 113
 echo -n "get_meta_section_files: test0 doesn't exist: "
... ...
@@ -267,5 +271,14 @@ EXPECT_VAL="
267 267
 attr = strip_trailing_space"
268 268
 check_result "$VAL" "$EXPECT_VAL"
269 269
 
270
-rm -f test.conf test1c.conf test2a.conf test-quote.conf test-space.conf test-equals.conf test-strip.conf
270
+echo -n "merge_config_file test7 colon in value: "
271
+rm -f test-colon.conf
272
+merge_config_file test.conf test7 test-colon.conf
273
+VAL=$(cat test-colon.conf)
274
+EXPECT_VAL="
275
+[DEFAULT]
276
+servers = 10.11.12.13:80"
277
+check_result "$VAL" "$EXPECT_VAL"
278
+
279
+rm -f test.conf test1c.conf test2a.conf test-quote.conf test-space.conf test-equals.conf test-strip.conf test-colon.conf
271 280
 rm -rf test-etc