Release 3.9.0+1: Remnawave API configs, Remnawave-style UI with flags, Windows build.
EOF Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package geoflag
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestFromText(t *testing.T) {
|
||||
cases := []struct {
|
||||
in, cc string
|
||||
}{
|
||||
{"DE-Frankfurt-1", "DE"},
|
||||
{"[NL] Amsterdam", "NL"},
|
||||
{"🇺🇸 US West", "US"},
|
||||
{"Germany Hetzner", "DE"},
|
||||
{"unknown-node", ""},
|
||||
}
|
||||
for _, c := range cases {
|
||||
cc, emoji := FromText(c.in)
|
||||
if cc != c.cc {
|
||||
t.Fatalf("%q: got cc %q want %q", c.in, cc, c.cc)
|
||||
}
|
||||
if c.cc != "" && emoji == "" {
|
||||
t.Fatalf("%q: empty emoji", c.in)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user