File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -485,6 +485,25 @@ func TestFormsAccessible(t *testing.T) {
485485 assert .Equal (t , "" , input )
486486 assert .Contains (t , out .String (), "Name your app (default: cool-app-123):" )
487487 })
488+
489+ t .Run ("password form appends colon in accessible mode" , func (t * testing.T ) {
490+ var input string
491+ f := buildPasswordForm (io , "Enter token" , PasswordPromptConfig {}, & input )
492+ f .Update (f .Init ())
493+
494+ view := ansi .Strip (f .View ())
495+ assert .Contains (t , view , "Enter token:" )
496+ })
497+
498+ t .Run ("password form preserves existing colon in accessible mode" , func (t * testing.T ) {
499+ var input string
500+ f := buildPasswordForm (io , "Enter token:" , PasswordPromptConfig {}, & input )
501+ f .Update (f .Init ())
502+
503+ view := ansi .Strip (f .View ())
504+ assert .Contains (t , view , "Enter token:" )
505+ assert .NotContains (t , view , "Enter token::" )
506+ })
488507}
489508
490509func TestFormsNoColor (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments