package toml import ( "testing" ) func TestComment2(t *testing.T) { for _, test := range []parseTest{ {``, `{}`, `unexpected end of file (expected comment) at start of file`}, {`#`, `{}`, ``}, {`# `, `{}`, ``}, {`# with data`, `{}`, ``}, {"# ending in EOL & EOF\r\n", `{}`, ``}, {`# \xxx/ \u can't escape/`, `{}`, ``}, {"# \tlexe\r accepts embedded ca\r\riage \returns\r\n", `{}`, ``}, {"# with data and newline\ncode continues here", `{}`, `unexpected input (expected end of file) at line 2, column 1`}, } { p := newParser() testParse(t, p, p.startComment, test) } }