mozilla/webvtt — pull request #334 by caitp (2013-04-05 03:09:53+00:00)
Title: More lenient cuetimes parsing +rm cuetimes tests with missing files

Previously, we were expecting that the parser could deal with slightly malformed timestamps, eg '00:9:43.000' (a single digit minute). More recently, the parsing algorithm had changed to skip a cue if timestamps in cuetimes are not absolutely perfect. This patch only skips the cue if the timestamp is completely unrecognizable, or if the error callback tells it to. This may or may not be desired behaviour, I am not certain.

There is a small change to the lexer, so that the 'L_TIMESTAMP3' state will not return a timestamp unless there is at least one digit following the '.'. This way, we can return the EXPECTED_TIMESTAMP rather than MALFORMED_TIMESTAMP error in cases where the milliseconds component does not contain digits. This makes previously written tests pass, so I'm okay with this.

There were a number of tests which were trying to load non-existent files, and therefore failing. I've removed these tests because I can not find the files anywhere. Perhaps they weren't needed (although I expect they were). If anyone knows where these might be, it would be helpful to know :>