From b11a9d7b302f44f67d023edb788636d7f747b12a Mon Sep 17 00:00:00 2001 From: Jaz White Date: Mon, 16 Oct 2023 13:23:34 -0400 Subject: [PATCH] test: demonstrate alias conversion (#399) fix in strcase dependency properly converts screaming snakecase to camelcase `MY_FLAG` -> `myFlag` --- aliases/alias_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aliases/alias_test.go b/aliases/alias_test.go index 53819770..d121f181 100644 --- a/aliases/alias_test.go +++ b/aliases/alias_test.go @@ -81,6 +81,14 @@ func Test_GenerateAliases(t *testing.T) { }, want: map[string][]string{"some_flag": slice("SomeFlag")}, }, + { + name: "screaming snake case to camel case", + flags: slice("SOME_FLAG"), + aliases: []o.Alias{ + alias(o.CamelCase), + }, + want: map[string][]string{"SOME_FLAG": slice("someFlag")}, + }, { name: "file exact pattern", flags: slice(testFlagKey),