package flags

import "testing"

func TestValidChar(t *testing.T) {
	tests := []struct {
		name  string
		char  rune
		valid bool
	}{
		{
			name:  "Valid char",
			char:  '1',
			valid: true,
		},
		{
			name:  "Invalid char",
			char:  'a',
			valid: false,
		},
		{
			name:  "Valid char but not relevant",
			char:  '0',
			valid: true,
		},
	}

	flags := Flags{}

	// Run tests
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if got := flags.validChar(tt.char); got != tt.valid {
				t.Errorf("validChar() = %v, want %v", got, tt.valid)
			}
		})
	}

}
