blob: e88eaf4fc8983bc89e3fb32b1d454b6dad648852 [file] [log] [blame]
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package flagutil
import (
"testing"
)
func TestRepeatedStringValue(t *testing.T) {
var val RepeatedStringValue
for _, s := range []string{"foo", "bar", "baz"} {
if err := val.Set(s); err != nil {
t.Fatal(err)
}
}
want := "foo, bar, baz"
if val.String() != want {
t.Errorf("Got value %q, wanted %q", val.String(), want)
}
}