The code needs test cases. A set of PGN games needs to be compiled which test the various aspects of the PGN standard, especially:
- Seven tag roster (STR)
- Input out of order -> export in order
- Additional tags
- Always export after STR
- Always export in alphabetical order
- Test on input where tags are mixed with STR
- Comments
- Handles brace comments
- Handles rest of line comments
- Move numbers
- Input with superfluous move numbers
- Input with no move numbers
- Input with multiple spaces between move numbers and symbols
- Export in proper standard game notation (e.g. 1. e4 e5 2. c3 ...)
- Symbols
- Tests all continuation characters ("_", "+", "#", "=", ":", "-", a-zA-Z, 0-9)
- Variations