// 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) | |
} | |
} |