1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-07 18:30:34 +00:00
pdf2htmlEX/test
2014-11-17 22:53:42 +08:00
..
old working on unittest 2014-11-16 00:06:43 +08:00
test_conversion improve test runner 2014-11-16 13:40:02 +08:00
test_naming working on unittest 2014-11-16 00:06:43 +08:00
.gitattributes check more c++11 features 2014-11-17 22:53:42 +08:00
fancy.min.css improve test runner 2014-11-16 13:40:02 +08:00
README.md improve test runner 2014-11-16 13:40:02 +08:00
test_conversion.py improve test runner 2014-11-16 13:40:02 +08:00
test_naming.py add libpoppler-private-dev to travis 2014-11-16 22:52:40 +08:00
test.py improve test runner 2014-11-16 13:40:02 +08:00

Dependencies

  • wkhtmltoimage
  • python2
  • Python Imaging Library

Usage

  • Run all tests:
    • ./test.py
  • Run selected tests:
    • ./test.py test_A test_B ...
  • Environment variables:
    • set P2H_TEST_SAVE_TMP=1 to keep the temporary files
    • set P2H_TEST_GEN=1 to generate new reference images instead of comparing with old ones

Guidelines for test cases

  • Make sure you have the proper copyrights.
  • Using meaningful file names, a description of the file, or issueXXX.pdf.
  • Make each test case minimal:
    • One page only, unless the test case is about multiple pages.
    • Grayscale only, unless the test case is about colors.
    • Remove unnecessary elements.
    • Set proper parameters for cropping in wkhtml2image_args.
  • [Optional] Include the source files that the PDF file is generated from.