Commit Graph
5 Commits
Author SHA1 Message Date
Cameron Cawley 28d7b361ea COMMON: Move more file format code into common/formats 2022-12-11 22:33:23 +01:00
Roland van Laar 70e715b6f8 TESTS: Fix compiler warnings integer comparisons
Use suffix `U` for integers when comparing results of `size`.
Use uints in the forloops.
2022-10-06 17:41:41 +02:00
Matthew Duggan ddee0e76f9 COMMON: INIFile bugfixes and unit tests
This adds a lot more unit tests for Common::INIFile and fixes some small
problems identified during their creation.  Specifically:

* addSection() did not check the validity of the section name, which meant it
  was possible to create a section that could not then be operated on by the
  other functions (which all check validity)
* If allowNonEnglishCharacters was set, it was possible to create a key or
  section name starting with '[' or '#', or including a carriage return.  This
  would not read back in correctly.
* Blank section and key names were considered valid, but neither would be
  read back in correctly.
* The struct documentation did not mention whitespcae handling or that comments
  include the '#' and carriage return.
2022-04-10 19:41:06 +03:00
Matthew Duggan a74b081973 TEST: Add more tests for Common::INIFile
My initial tests were quite minimal as I was trying to fix the build.  Now more
of the basic INIFile functionality is tested.
2022-03-25 18:16:07 +09:00
Matthew Duggan 97a0e8d2d9 TEST: Add tests for Common::INIFile
This is partly an attempt to fix the build on debian and windows as apparently
the INIFile class is not being linked in to the tests.
2022-03-25 17:35:51 +09:00