Skip to content

Commit 1aabe5c

Browse files
committed
feat(config): add path normalization test
Signed-off-by: Sizhe Zhao <[email protected]>
1 parent d8f9cc4 commit 1aabe5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

config/config_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,13 @@ func TestLoadConfigFileWithOnlyDestinationRules(t *testing.T) {
365365
assert.Nil(t, err)
366366
}
367367

368+
func TestLoadConfigFileWithBackslashInPath(t *testing.T) {
369+
conf, err := parseCreationRuleForFile(parseConfigFile(sampleConfigWithPath, t), "/conf/path", "foo\\bar2000", nil)
370+
assert.Nil(t, err)
371+
assert.Equal(t, "2", conf.KeyGroups[0][0].ToString())
372+
assert.Equal(t, "1", conf.KeyGroups[0][1].ToString())
373+
}
374+
368375
func TestKeyGroupsForFile(t *testing.T) {
369376
conf, err := parseCreationRuleForFile(parseConfigFile(sampleConfig, t), "/conf/path", "foobar2000", nil)
370377
assert.Nil(t, err)

0 commit comments

Comments
 (0)