Skip to content

Commit

Permalink
feat(config): add path normalization test
Browse files Browse the repository at this point in the history
Signed-off-by: Sizhe Zhao <[email protected]>
  • Loading branch information
Prince213 committed Jun 7, 2024
1 parent d8f9cc4 commit 1aabe5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ func TestLoadConfigFileWithOnlyDestinationRules(t *testing.T) {
assert.Nil(t, err)
}

func TestLoadConfigFileWithBackslashInPath(t *testing.T) {
conf, err := parseCreationRuleForFile(parseConfigFile(sampleConfigWithPath, t), "/conf/path", "foo\\bar2000", nil)
assert.Nil(t, err)
assert.Equal(t, "2", conf.KeyGroups[0][0].ToString())
assert.Equal(t, "1", conf.KeyGroups[0][1].ToString())
}

func TestKeyGroupsForFile(t *testing.T) {
conf, err := parseCreationRuleForFile(parseConfigFile(sampleConfig, t), "/conf/path", "foobar2000", nil)
assert.Nil(t, err)
Expand Down

0 comments on commit 1aabe5c

Please sign in to comment.