Skip to content

Commit

Permalink
Remove unecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
philipesteiff authored and cqroot committed Sep 21, 2024
1 parent 32cc872 commit aec488a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions input/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,29 +80,24 @@ func TestDefaultValueWithValidateFunc(t *testing.T) {
}

func TestWithCharLimit(t *testing.T) {
// Initialize input and output buffers
var in bytes.Buffer
var out bytes.Buffer

inputString := []byte(strings.Repeat("a", 400) + "\r\n")

in.Write(inputString)

// Create a new model with a custom char limit using WithCharLimit
model := input.New(
"test",
input.WithCharLimit(400),
)

// Run the model using tea program
tm, err := tea.NewProgram(model, tea.WithInput(&in), tea.WithOutput(&out)).Run()
require.Nil(t, err)

// Retrieve the final model after running the tea program
m, ok := tm.(input.Model)
require.True(t, ok)

// Check if the CharLimit is correctly set
require.Equal(t, 400, len(m.Data()))
}

Expand Down

0 comments on commit aec488a

Please sign in to comment.