12 machine api.github.com
16 machine incomlete.host
23 machine oneline login user3 password pwd3
25 machine ignore.host macdef ignore
29 machine hasmacro.too macdef ignore-next-lines login user4 password pwd4
35 password gopher@golang.org
39 password too-late-in-file
42 func TestParse(t *testing.T) {
43 lines := Parse(testNetrc)
45 {"api.github.com", "user", "pwd"},
46 {"test.host", "user2", "pwd2"},
47 {"oneline", "user3", "pwd3"},
48 {"hasmacro.too", "user4", "pwd4"},
50 if !reflect.DeepEqual(lines, want) {
51 t.Errorf("have %q\nwant %q", lines, want)