Commit Graph

8 Commits

Author SHA1 Message Date
Billy Keyes cbd3915448 Add final tests for git header parsing functions
This gets 100% test coverage for the functions involved in parsing
Git-style file headers. Whether that actually makes it correct remains
to be seen.
2019-03-19 21:50:50 -07:00
Billy Keyes a1f92fec30 Fix and test old/new file name verification 2019-03-18 23:05:15 -07:00
Billy Keyes 6daf604b25 Add tests for git header data parsing
Fix parseGitHeaderIndex to allow abbreviated OIDs and add a note about
this to the README. The behavior might change again later, based on some
experimentation with Git.
2019-03-17 21:38:14 -07:00
Billy Keyes 3f641b393f Add tests and fix bugs with name parsing
Also convert all table tests to use maps instead of structs with name
fields and standardize other field names.
2019-03-17 20:21:58 -07:00
Billy Keyes ea5b8bceea Finish parsing filenames from Git headers
Adds "default" name handling, error checks for missing names, and prefix
and double-slash stripping.
2019-03-17 15:34:03 -07:00
Billy Keyes bca8d0806e Detach parseFragmentHeader from parser struct
This operates on a single line and doesn't need any parser state.
2019-03-14 21:55:06 -07:00
Billy Keyes 4ddf1d962d Implement fragment header parsing
Use a regexp for simplicity, unlike the direct parsing in Git.
2019-03-13 23:04:01 -07:00
Billy Keyes f630455e5d Add a simple test for parser line operations 2019-03-11 23:05:15 -07:00