// Copyright (c) 2016, Daniel Martí // See LICENSE for licensing information package syntax import ( "io" "strings" "testing" ) func BenchmarkParse(b *testing.B) { b.ReportAllocs() src := "" + strings.Repeat("\n\n\t\t \n", 10) + "# " + strings.Repeat("foo bar ", 10) + "\n" + strings.Repeat("longlit_", 10) + "\n" + "'" + strings.Repeat("foo bar ", 10) + "'\n" + `"` + strings.Repeat("foo bar ", 10) + `"` + "\n" + strings.Repeat("aa bb cc dd; ", 6) + "a() { (b); { c; }; }; $(d; `e`)\n" + "foo=bar; a=b; c=d$foo${bar}e $simple ${complex:-default}\n" + "if a; then while b; do for c in d e; do f; done; done; fi\n" + "a | b && c || d | e && g || f\n" + "foo >a &1 <