package main

import "testing"

func TestRepeatedEventTypeFlagAcceptsMultipleAndRejectsEmpty(t *testing.T) {
	var values repeatedFlag
	if err := values.Set(" GiftConfigChanged "); err != nil {
		t.Fatalf("first event type failed: %v", err)
	}
	if err := values.Set("ResourceChanged"); err != nil {
		t.Fatalf("second event type failed: %v", err)
	}
	if len(values) != 2 || values[0] != "GiftConfigChanged" || values[1] != "ResourceChanged" {
		t.Fatalf("repeated event types mismatch: %v", values)
	}
	if err := values.Set("   "); err == nil {
		t.Fatal("expected empty event type rejection")
	}
}
