From 805ef503116ecb49996e4f09afb98ceb0c78f096 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Fri, 3 Jul 2015 20:52:18 -0400 Subject: [PATCH] make sure to test new escape characters --- forge_test.go | 2 ++ test.cfg | 1 + 2 files changed, 3 insertions(+) diff --git a/forge_test.go b/forge_test.go index d45b9ba..0d55720 100644 --- a/forge_test.go +++ b/forge_test.go @@ -14,6 +14,7 @@ global = "global value"; # Primary stuff primary { string = "primary string value"; + string_with_quote = "some \"quoted\" str\\ing"; integer = 500; float = 80.80; negative = -50; @@ -54,6 +55,7 @@ func assertDirectives(values map[string]interface{}, t *testing.T) { // Primary primary := values["primary"].(map[string]interface{}) assertEqual(primary["string"], "primary string value", t) + assertEqual(primary["string_with_quote"], "some \"quoted\" str\\ing", t) assertEqual(primary["integer"], int64(500), t) assertEqual(primary["float"], float64(80.80), t) assertEqual(primary["negative"], int64(-50), t) diff --git a/test.cfg b/test.cfg index 6ef259a..4d0b634 100644 --- a/test.cfg +++ b/test.cfg @@ -3,6 +3,7 @@ global = "global value"; # Primary stuff primary { string = "primary string value"; + string_with_quote = "some \"quoted\" str\\ing"; integer = 500; float = 80.80; negative = -50;