amppackager
amppackager copied to clipboard
Add more tests to accept_test.go
Add all the tests in cl/243547227 that are missing from accept_test.go. Maybe require putting some of those on the wrong side, as #240 is still open.
Also, per https://github.com/ampproject/amppackager/pull/296#discussion_r285801253:
Add some tests including
\\"(escaped backslash followed by unescaped quote) and\\\"(escaped backslash followed by escaped quote), to guard againsttokenizebeing replaced by something simpler but wrong.
And maybe https://github.com/ampproject/amppackager/pull/296#discussion_r285801652, if a falsifiable test can be created:
I think if
!inQuotes, this should be a parse error, per the tchar definition. I guess returning empty list would make sense in this case. Add a test for this if possible; maybe something likeapplication/signed-exchange;v=b3;x=foo\,bar.