And when there are enough automated tests, it becomes much easier to refactor style files to provide improved implementation and additional functionality. And to do this without unknowingly changing the typesetting of existing documents.
The TeX Hour is Thursday 2 March 6:30 to 7:30pm GMT. For more information (and afterwards the video recording) see https://texhour.github.io/2023/03/02/regress-test-unlatex/.
The TeX Hour is Thursday 9 March 6:30 to 7:30pm GMT. For more information (and afterwards the video recording) see https://texhour.github.io/2023/03/09/unlatex-texbox-access-tree/
Prior to the TeX Hour, examples and code will be available at https://github.com/arxtex/unlatex