Skip to content

Commit b11a9d7

Browse files
authored
test: demonstrate alias conversion (#399)
fix in strcase dependency properly converts screaming snakecase to camelcase `MY_FLAG` -> `myFlag`
1 parent 530ed76 commit b11a9d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

aliases/alias_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ func Test_GenerateAliases(t *testing.T) {
8181
},
8282
want: map[string][]string{"some_flag": slice("SomeFlag")},
8383
},
84+
{
85+
name: "screaming snake case to camel case",
86+
flags: slice("SOME_FLAG"),
87+
aliases: []o.Alias{
88+
alias(o.CamelCase),
89+
},
90+
want: map[string][]string{"SOME_FLAG": slice("someFlag")},
91+
},
8492
{
8593
name: "file exact pattern",
8694
flags: slice(testFlagKey),

0 commit comments

Comments
 (0)