package subscription

import "testing"

func TestParseLinkLines(t *testing.T) {
	nodes, errs := ParseLinkLines("socks5://1.2.3.4:1080#test-node\n")
	if len(errs) != 0 {
		t.Fatal(errs)
	}
	if len(nodes) != 1 || nodes[0].Name != "test-node" || nodes[0].Source != "manual" {
		t.Fatalf("unexpected %+v", nodes[0])
	}
}
