amppackager icon indicating copy to clipboard operation
amppackager copied to clipboard

Add more tests to accept_test.go

Open twifkak opened this issue 6 years ago • 2 comments
trafficstars

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.

twifkak avatar May 03 '19 23:05 twifkak

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 against tokenize being replaced by something simpler but wrong.

twifkak avatar Jun 04 '19 20:06 twifkak

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 like application/signed-exchange;v=b3;x=foo\,bar.

twifkak avatar Jun 04 '19 20:06 twifkak