@@ -86,13 +86,32 @@ func TestEdgeCases(t *testing.T) {
8686 }
8787
8888 // Case B: Indicator != Delimiter
89- // With proposed fix, this should use the indicator as delimiter
89+ // This should use the indicator as delimiter
9090 res = ToFormattedCase (input , OptionDelimiter ("-" ), OptionUpperIndicator ("=" ))
9191 if res != "hello=world" {
9292 t .Errorf ("UpperIndicator Override: got %q, want %q" , res , "hello=world" )
9393 }
9494 })
9595
96+ // 5.1 UpperIndicator with MixCaseSupport (Consistency Check)
97+ t .Run ("UpperIndicator MixCase Consistency" , func (t * testing.T ) {
98+ input := []Word {ExactCaseWord ("helloWorld" ), SingleCaseWord ("foo" )}
99+
100+ // Case A: Override behavior
101+ // Expectation: hello=World=foo (UpperIndicator "=" overrides Delimiter "-")
102+ res := ToFormattedCase (input , OptionDelimiter ("-" ), OptionUpperIndicator ("=" ), OptionMixCaseSupport ())
103+ if res != "hello=World=foo" {
104+ t .Errorf ("UpperIndicator MixCase Override: got %q, want %q" , res , "hello=World=foo" )
105+ }
106+
107+ // Case B: Double Delimiter behavior
108+ // Expectation: hello--World--foo (UpperIndicator "-" matches Delimiter "-", so double delimiter)
109+ res = ToFormattedCase (input , OptionDelimiter ("-" ), OptionUpperIndicator ("-" ), OptionMixCaseSupport ())
110+ if res != "hello--World--foo" {
111+ t .Errorf ("UpperIndicator MixCase Double: got %q, want %q" , res , "hello--World--foo" )
112+ }
113+ })
114+
96115 // 6. Empty and Nil Input
97116 t .Run ("Empty and Nil Input" , func (t * testing.T ) {
98117 res := ToFormattedCase (nil )
0 commit comments