Skip to content

Upgrade the testing export compare mechanisms

Martin Owens requested to merge inkex-tester-export-update into master

In order to make test writing easier, this upgrade changes the way the EXPORT_COMPARE variable is used. It now comes in 4 modes

EXPORT_COMPARE=0 (default) - Compare delete mode, deletes comparisons EXPORT_COMPARE=1 - Compare check mode, saves the comparison under a new name EXPORT_COMPARE=2 - Compare write mode, saves the comparison if it's new EXPORT_COMPARE=3 - Compare overwrite mode, this saves no matter what

Other changes include:

  • New outfile for assertCompare which cleans some tests of having to do their own EXPORT_COMPARE mechanisms.
  • The use of compare_file_extension during compare check mode allows opening of the files in programs without as many issues as '.export'
  • Rerun the test when writing, so the test is still run even if the output file didn't exist. And double checks consistancy when overwriting.
  • _base_compare is now split out so it could be over-loaded by a test if they wanted to do their own fancy comparison.
  • gitignore will ignore all files that don't end in .out (fancy!)

Merge request reports