Warn about attempts to use escape quotes.

This commit is contained in:
Oleksii Kliukin
2017-11-22 10:43:35 +01:00
parent f6a2225c38
commit 086ead03f5
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ var getMapPairsFromStringTest = []struct {
}{
{"log_statement:all, work_mem:'4GB'", []string{"log_statement:all", "work_mem:'4GB'"}, nil},
{`log_statement:none, search_path:'"$user", public'`, []string{"log_statement:none", `search_path:'"$user", public'`}, nil},
{`search_path:'"$user"`, nil, fmt.Errorf("unclosed quote starting at position 13")},
{`search_path:'"$user"`, nil, fmt.Errorf("unmatched quote starting at position 13")},
{"", []string{""}, nil},
{",,log_statement:all ,", []string{"", "", "log_statement:all", ""}, nil},
}