Browse Source

Basic visual sanity test for better regression testing

dev
Andy Meneely 11 years ago
parent
commit
5ea9ce619f
  1. 1
      .gitignore
  2. 7
      CHANGELOG.md
  3. 4
      README.md
  4. 1
      RELEASE TODO.md
  5. 7
      Rakefile
  6. BIN
      spec/samples/expected/autoscale_00.png
  7. BIN
      spec/samples/expected/autoscale_01.png
  8. BIN
      spec/samples/expected/autoscale_02.png
  9. BIN
      spec/samples/expected/backend_00.png
  10. 78
      spec/samples/expected/backend_00.svg
  11. BIN
      spec/samples/expected/backend_01.png
  12. 78
      spec/samples/expected/backend_01.svg
  13. BIN
      spec/samples/expected/basic_00.png
  14. BIN
      spec/samples/expected/basic_01.png
  15. BIN
      spec/samples/expected/basic_02.png
  16. BIN
      spec/samples/expected/cairo_access_00.png
  17. BIN
      spec/samples/expected/cairo_access_01.png
  18. BIN
      spec/samples/expected/card_00.png
  19. BIN
      spec/samples/expected/card_01.png
  20. BIN
      spec/samples/expected/colors_00.png
  21. BIN
      spec/samples/expected/config_disable_text_00.png
  22. BIN
      spec/samples/expected/config_text_00.png
  23. BIN
      spec/samples/expected/custom-config_00.png
  24. BIN
      spec/samples/expected/embed_00.png
  25. BIN
      spec/samples/expected/embed_multi_00.png
  26. BIN
      spec/samples/expected/embed_multi_01.png
  27. BIN
      spec/samples/expected/embed_multi_02.png
  28. BIN
      spec/samples/expected/embed_multisheet_00.png
  29. 0
      spec/samples/expected/gitkeep.txt
  30. BIN
      spec/samples/expected/gradient_00.png
  31. BIN
      spec/samples/expected/landscape_00.png
  32. BIN
      spec/samples/expected/layout2_00.png
  33. BIN
      spec/samples/expected/layout_00.png
  34. BIN
      spec/samples/expected/layout_builtin_hand_00.png
  35. BIN
      spec/samples/expected/layout_builtin_playing_card_00.png
  36. BIN
      spec/samples/expected/load_images_00.png
  37. BIN
      spec/samples/expected/portrait_00.png
  38. BIN
      spec/samples/expected/ranges_00.png
  39. BIN
      spec/samples/expected/ranges_01.png
  40. BIN
      spec/samples/expected/ranges_02.png
  41. BIN
      spec/samples/expected/sample_csv_00.png
  42. BIN
      spec/samples/expected/sample_csv_01.png
  43. BIN
      spec/samples/expected/sample_excel_00.png
  44. BIN
      spec/samples/expected/sample_excel_01.png
  45. BIN
      spec/samples/expected/sample_excel_02.png
  46. BIN
      spec/samples/expected/save_sheet_00.png
  47. BIN
      spec/samples/expected/save_sheet_01.png
  48. BIN
      spec/samples/expected/save_sheet_range_00.png
  49. BIN
      spec/samples/expected/save_sheet_range_01.png
  50. BIN
      spec/samples/expected/save_single_sheet_00.png
  51. BIN
      spec/samples/expected/saves_notrim_01.png
  52. BIN
      spec/samples/expected/shape_00.png
  53. BIN
      spec/samples/expected/showcase.png
  54. BIN
      spec/samples/expected/showcase2.png
  55. BIN
      spec/samples/expected/showcase_individual_00.png
  56. BIN
      spec/samples/expected/showcase_individual_01.png
  57. BIN
      spec/samples/expected/showcase_individual_02.png
  58. BIN
      spec/samples/expected/showcase_individual_03.png
  59. BIN
      spec/samples/expected/text_00.png
  60. BIN
      spec/samples/expected/text_01.png
  61. BIN
      spec/samples/expected/text_02.png
  62. BIN
      spec/samples/expected/tgc_sample_00.png
  63. BIN
      spec/samples/expected/units_00.png
  64. 33
      spec/samples/sanity.html.erb
  65. 45
      spec/samples/sanity.rb
  66. 1
      squib.gemspec

1
.gitignore vendored

@ -33,3 +33,4 @@ benchmarks/_output/*.pdf
benchmarks/_output/
samples/_output/*.svg
*.sublime-workspace
spec/samples/sanity.html

7
CHANGELOG.md

@ -9,6 +9,13 @@ Features:
Bugs:
* Fixed global text hinting (#63)
Compatbility:
* rsvg2 and pango updated to v2.2.5. Squib follows 2.2.x of both of those. If you run `bundle` you will automatically be upgraded. They appear to be mostly bugfix releases.
Chores:
* Added `rake sanity` as a visual regression test to ensure the samples don't break
* Lots of automated test refactoring
Thanks to [pickfifteen](https://github.com/pickfifteen) for the bug report!
## v0.5.1 / 2015-04-13

4
README.md

@ -523,7 +523,7 @@ If you want to test new features as I develop them, you can always point your Ge
gem 'squib', :git => 'git://github.com/andymeneely/squib', :branch => "dev"
```
* The `dev` branch is where I am working on features in-process. I have not done much regression testing at this point, but would love testing feedback nonetheless.
* The `master` branch is where I consider features that are done and tested, but not released yet.
* The `master` branch is where I consider features and bug that are done and tested, but not released yet.
## Contributing
@ -535,6 +535,8 @@ If you want your code integrated:
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
Be sure to run the unit tests and packaging with just `rake`. Also, you can check that the samples render properly with `rake sanity`.
# What's up the with the name?
Truthfully, I just thought it was a cool, simple word that was not used much in the Ruby community nor the board game community. But, now that I've committed to the name, I've realized that:

1
RELEASE TODO.md

@ -7,6 +7,7 @@ Be sure to remember to do the following for releases. (Copy into a GitHub issue)
- [ ] Check that sample regression tests are all enabled
- [ ] Bump version.rb
- [ ] Do a full rake locally
- [ ] `rake sanity`, and check visually
- [ ] Travis is passing on dev branch
- [ ] Merge master branch
- [ ] Create GitHub release tag

7
Rakefile

@ -40,6 +40,13 @@ task benchmark: [:install] do
end
end
task :sanity do
require_relative 'spec/samples/sanity.rb'
Sanity.new.run
end
task sanity_clean: [:install, :spec, :sanity]
task :apply_google_analytics do
# The string to replace in the html document. This is chosen to be the end
# body </body> tag. So the script can be injected as the last thing in the

BIN
spec/samples/expected/autoscale_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
spec/samples/expected/autoscale_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
spec/samples/expected/autoscale_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
spec/samples/expected/backend_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

78
spec/samples/expected/backend_00.svg

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="825pt" height="1125pt" viewBox="0 0 825 1125" version="1.1">
<defs>
<g>
<symbol overflow="visible" id="glyph0-0">
<path style="stroke:none;" d="M 12 0 L 12 -72 L 84 -72 L 84 0 Z M 18 -6 L 78 -6 L 78 -66 L 18 -66 Z M 18 -6 "/>
</symbol>
<symbol overflow="visible" id="glyph0-1">
<path style="stroke:none;" d="M 66 0 L 48 0 L 48 -31 L 25 -31 L 25 0 L 7 0 L 7 -70 L 25 -70 L 25 -44 L 48 -44 L 48 -70 L 66 -70 Z M 66 0 "/>
</symbol>
<symbol overflow="visible" id="glyph0-2">
<path style="stroke:none;" d="M 33.109375 1 C 23.066406 0.996094 15.371094 -1.390625 10.023438 -6.164063 C 4.671875 -10.9375 1.996094 -17.742188 2 -26.578125 C 1.996094 -35.210938 4.496094 -42.105469 9.492188 -47.265625 C 14.484375 -52.417969 21.464844 -54.996094 30.4375 -55 C 38.589844 -54.996094 44.722656 -52.828125 48.835938 -48.5 C 52.941406 -44.164063 54.996094 -37.960938 55 -29.890625 L 55 -24 L 18 -24 C 18.15625 -21.507813 18.683594 -19.425781 19.585938 -17.757813 C 20.484375 -16.082031 21.675781 -14.75 23.15625 -13.765625 C 24.601563 -12.78125 26.289063 -12.078125 28.21875 -11.648438 C 30.144531 -11.214844 32.246094 -10.996094 34.53125 -11 C 36.484375 -10.996094 38.414063 -11.207031 40.3125 -11.625 C 42.207031 -12.039063 43.941406 -12.589844 45.515625 -13.28125 C 46.898438 -13.863281 48.175781 -14.496094 49.351563 -15.179688 C 50.519531 -15.859375 51.476563 -16.464844 52.21875 -17 L 54 -17 L 54 -3.375 C 52.644531 -2.84375 51.402344 -2.351563 50.28125 -1.898438 C 49.152344 -1.445313 47.617188 -0.984375 45.671875 -0.515625 C 43.867188 -0.0390625 42.011719 0.332031 40.101563 0.601563 C 38.1875 0.863281 35.855469 0.996094 33.109375 1 Z M 39 -34 C 38.894531 -37.582031 38.039063 -40.3125 36.4375 -42.1875 C 34.832031 -44.0625 32.367188 -45 29.046875 -45 C 25.65625 -45 23.011719 -44.015625 21.109375 -42.046875 C 19.199219 -40.078125 18.148438 -37.394531 17.953125 -34 Z M 39 -34 "/>
</symbol>
<symbol overflow="visible" id="glyph0-3">
<path style="stroke:none;" d="M 22 0 L 6 0 L 6 -73 L 22 -73 Z M 22 0 "/>
</symbol>
<symbol overflow="visible" id="glyph0-4">
<path style="stroke:none;" d="M 57 -26.46875 C 57 -17.640625 54.605469 -10.691406 49.820313 -5.617188 C 45.03125 -0.539063 38.257813 1.996094 29.5 2 C 20.808594 1.996094 14.054688 -0.539063 9.234375 -5.617188 C 4.410156 -10.691406 1.996094 -17.640625 2 -26.46875 C 1.996094 -35.390625 4.410156 -42.378906 9.234375 -47.429688 C 14.054688 -52.472656 20.808594 -54.996094 29.5 -55 C 38.226563 -54.996094 44.992188 -52.457031 49.796875 -47.382813 C 54.597656 -42.300781 57 -35.328125 57 -26.46875 Z M 40 -26.375 C 39.996094 -29.558594 39.734375 -32.214844 39.21875 -34.335938 C 38.695313 -36.453125 37.972656 -38.148438 37.046875 -39.421875 C 36.066406 -40.753906 34.960938 -41.683594 33.726563 -42.210938 C 32.492188 -42.734375 31.082031 -42.996094 29.5 -43 C 28.007813 -42.996094 26.660156 -42.765625 25.460938 -42.304688 C 24.253906 -41.839844 23.148438 -40.957031 22.140625 -39.65625 C 21.179688 -38.414063 20.417969 -36.710938 19.851563 -34.546875 C 19.28125 -32.378906 18.996094 -29.652344 19 -26.375 C 18.996094 -23.101563 19.265625 -20.453125 19.804688 -18.429688 C 20.339844 -16.398438 21.035156 -14.78125 21.890625 -13.578125 C 22.785156 -12.335938 23.894531 -11.429688 25.226563 -10.859375 C 26.550781 -10.28125 28.023438 -9.996094 29.640625 -10 C 30.972656 -9.996094 32.328125 -10.28125 33.703125 -10.859375 C 35.078125 -11.429688 36.175781 -12.289063 37 -13.4375 C 37.988281 -14.796875 38.734375 -16.445313 39.242188 -18.375 C 39.742188 -20.300781 39.996094 -22.964844 40 -26.375 Z M 40 -26.375 "/>
</symbol>
<symbol overflow="visible" id="glyph0-5">
<path style="stroke:none;" d="M 26 -18 L 9.84375 18 L 0 18 L 9.09375 -18 Z M 26 -18 "/>
</symbol>
<symbol overflow="visible" id="glyph0-6">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph0-7">
<path style="stroke:none;" d="M 84 -53 L 68.8125 0 L 51.578125 0 L 42.453125 -34.265625 L 33.28125 0 L 16.046875 0 L 1 -53 L 17.625 -53 L 26.015625 -17.9375 L 35.875 -53 L 50.1875 -53 L 59.5 -17.9375 L 67.359375 -53 Z M 84 -53 "/>
</symbol>
<symbol overflow="visible" id="glyph0-8">
<path style="stroke:none;" d="M 42 -38 L 40.5625 -38 C 39.902344 -38.328125 38.945313 -38.578125 37.695313 -38.75 C 36.4375 -38.914063 35.050781 -39 33.53125 -39 C 31.714844 -39 29.8125 -38.742188 27.820313 -38.226563 C 25.824219 -37.710938 23.882813 -37.097656 22 -36.390625 L 22 0 L 6 0 L 6 -53 L 22 -53 L 22 -45.234375 C 22.789063 -45.921875 23.886719 -46.789063 25.289063 -47.84375 C 26.6875 -48.890625 27.964844 -49.730469 29.125 -50.359375 C 30.382813 -51.085938 31.847656 -51.707031 33.515625 -52.226563 C 35.179688 -52.738281 36.75 -52.996094 38.234375 -53 C 38.792969 -52.996094 39.421875 -52.980469 40.117188 -52.953125 C 40.808594 -52.917969 41.4375 -52.878906 42 -52.828125 Z M 42 -38 "/>
</symbol>
<symbol overflow="visible" id="glyph0-9">
<path style="stroke:none;" d="M 54 0 L 38 0 L 38 -5.484375 C 36.914063 -4.609375 35.679688 -3.671875 34.289063 -2.671875 C 32.898438 -1.671875 31.675781 -0.921875 30.625 -0.421875 C 29.277344 0.328125 27.949219 0.917969 26.640625 1.351563 C 25.324219 1.78125 23.757813 1.996094 21.9375 2 C 15.800781 1.996094 10.941406 -0.550781 7.367188 -5.648438 C 3.785156 -10.746094 1.996094 -17.558594 2 -26.09375 C 1.996094 -30.796875 2.605469 -34.882813 3.820313 -38.351563 C 5.03125 -41.8125 6.710938 -44.832031 8.859375 -47.40625 C 10.804688 -49.738281 13.167969 -51.585938 15.953125 -52.953125 C 18.730469 -54.3125 21.667969 -54.996094 24.765625 -55 C 27.574219 -54.996094 29.882813 -54.707031 31.695313 -54.132813 C 33.5 -53.550781 35.601563 -52.652344 38 -51.4375 L 38 -73 L 54 -73 Z M 38 -14.3125 L 38 -41.515625 C 37.164063 -41.9375 36.070313 -42.292969 34.71875 -42.578125 C 33.359375 -42.855469 32.199219 -42.996094 31.234375 -43 C 27.167969 -42.996094 24.113281 -41.546875 22.070313 -38.65625 C 20.019531 -35.757813 18.996094 -31.707031 19 -26.5 C 18.996094 -21.039063 19.8125 -17.089844 21.445313 -14.65625 C 23.074219 -12.214844 25.707031 -10.996094 29.34375 -11 C 30.820313 -10.996094 32.316406 -11.292969 33.835938 -11.890625 C 35.347656 -12.480469 36.734375 -13.289063 38 -14.3125 Z M 38 -14.3125 "/>
</symbol>
<symbol overflow="visible" id="glyph0-10">
<path style="stroke:none;" d="M 25 -70 L 23.140625 -20 L 8.859375 -20 L 7 -70 Z M 25 0 L 7 0 L 7 -12 L 25 -12 Z M 25 0 "/>
</symbol>
</g>
<image id="image200" width="128" height="128" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAQAAABpN6lAAAAAAmJLR0QAxtiKRLcAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfeCAwPOiprCHMUAAAM90lEQVR42uVda3RVxRX+EiLhFRACYrQEjBheN0VABQlgKiDlbVCqxQd0UaiiRRHBroWg1UVVFGm6LGhXrNJSwSoiWhQDKBKCouIDEiERoiGoaJSXEkFDvv7gcnPOvWfmzMyZG2O7Z2Wtm3P27Nl7n3ns2bNnJoHwhzIUYlto56N7s6tQjRNoyJCCdkgv6nZDn+KByFTAT6CP6MuwisX4aUIIuQnX+qmBwlSE8bMlr38yafzsIslrweNKTMz9XxD+VJqYW6mjgHykGBTSrEGrIIX5qgq4MWRWxNwGrgLwxpCCAkY8YUp+OHc1+KYw4gkfBeRsNif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2XMNrrQZADuNhC7PGwE2gpeYY/isrwg+NbH5Wge46doCu526IFnYHPI0qTA00Db4a5SjQWpJXtwUaQftQ9cXSWJ43hO+e5zDt796fyzxp3c+HpDVitXIJKdQ+UrPMo8D3uCB8dMWffCrnBs5kN98yzuE0/kdgbWx2xKgN4r180wPnqLI0GUzI2bwxW6/PrIMirEOB6xzZf2O8EpVKFGMH9uEIjuAwatEKLdESachCSBKAU47f4yWP530wFENxqeNJGvYr8ZFTpHmvxBCStXyFtwscD9sYPxjhy11XTucLPK4RTHFjSPNg5e4+MYIH46iALspcdlAO5Mu3fbS2F3xEcBhXGWycdcMYq1ZF2Jds93D1MzzY/soxM+jOGYp1ZAvvZJ9wkzsFs6yLHyIBYq61OtDPI6yldRROjoL41znwcy3sJBOlubB8wcKEGFG8Btk1PuJ/EIU/KTJNst8ALF+xMTdKlL6eWC18FNBRcBDPl5bFj1yxYe+SlSdcguQahc8v8sxxt5Xdiu5U5JwL2blmZ5NyPE+FQPxvpcd5pFkU33XNjq2LlupW5f0uXespUMBI6dkAQ6yJH3PRkp2rtk7BKgXcfxrsD8q0poB8L3dA0MvWmkecmSrYjXgiRgGpcTB1vA1ggT8k2HV7Jw9LKlfGn6S8vGY3Ca/bI4JduDiW5AE21sjhnNN/UU/iSy9cDFYLbmONZiU+x6GAfj/C1xe4BE37gsd4nnaeU2dVraz3ti/1iZpdu3u6EVNHSZJN4i68xrW7J+2C+rp4eTTJaXEvRfPiZYYN5Pq5evvRONOXX739f3/5eoLKylgZCrEttPPRvdlVqMaJBi10CtohvajbDX2KB/rdOw8A+C/P9iz7dYa7BgAAAABJRU5ErkJggg=="/>
<filter id="alpha" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feColorMatrix type="matrix" in="SourceGraphic" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
</filter>
<mask id="mask0">
<g filter="url(#alpha)">
<use xlink:href="#image200" transform="matrix(1,0,0,1,250,250)"/>
</g>
</mask>
</defs>
<g id="surface193">
<rect x="0" y="0" width="825" height="1125" style="fill:rgb(50.196078%,50.196078%,50.196078%);fill-opacity:1;stroke:none;"/>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph0-1" x="106" y="596"/>
<use xlink:href="#glyph0-2" x="179" y="596"/>
<use xlink:href="#glyph0-3" x="236" y="596"/>
<use xlink:href="#glyph0-3" x="265" y="596"/>
<use xlink:href="#glyph0-4" x="294" y="596"/>
<use xlink:href="#glyph0-5" x="353" y="596"/>
<use xlink:href="#glyph0-6" x="383" y="596"/>
<use xlink:href="#glyph0-7" x="411" y="596"/>
<use xlink:href="#glyph0-4" x="496" y="596"/>
<use xlink:href="#glyph0-8" x="555" y="596"/>
<use xlink:href="#glyph0-3" x="597" y="596"/>
<use xlink:href="#glyph0-9" x="626" y="596"/>
<use xlink:href="#glyph0-10" x="686" y="596"/>
</g>
<path style="fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 76 38 L 750 38 C 769 38 788 57 788 76 L 788 1050 C 788 1069 769 1088 750 1088 L 76 1088 C 57 1088 38 1069 38 1050 L 38 76 C 38 57 57 38 76 38 Z M 76 38 "/>
<path style="fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 125 400 C 125 413.808594 113.808594 425 100 425 C 86.191406 425 75 413.808594 75 400 C 75 386.191406 86.191406 375 100 375 C 113.808594 375 125 386.191406 125 400 "/>
<path style="fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 100 425 L 125 475 L 75 475 Z M 100 425 "/>
<path style="fill:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 100 620 L 720 620 "/>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:10.625396;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 72.416536 -378.68698 L 439.575917 -378.68698 C 476.648655 -378.68698 506.694943 -348.640692 506.694943 -311.583603 L 506.694943 55.575778 C 506.694943 92.648516 476.648655 122.694804 439.575917 122.694804 L 72.416536 122.694804 C 35.359447 122.694804 5.313159 92.648516 5.313159 55.575778 L 5.313159 -311.583603 C 5.313159 -348.640692 35.359447 -378.68698 72.416536 -378.68698 Z M 72.416536 -378.68698 " transform="matrix(0.249615,0,0,0.249615,100.197194,171.049335)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 109.25 169.125 C 104.289063 172.332031 101 177.90625 101 184.25 C 101 194.191406 109.058594 202.25 119 202.25 C 124.957031 202.25 130.222656 199.335938 133.5 194.875 C 130.6875 196.691406 127.34375 197.75 123.75 197.75 C 113.808594 197.75 105.75 189.691406 105.75 179.75 C 105.75 175.765625 107.058594 172.105469 109.25 169.125 Z M 109.25 169.125 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 151.84375 123.230469 L 105.195313 169.878906 L 105.195313 195.828125 L 130.269531 195.828125 L 177.355469 148.742188 Z M 151.84375 123.230469 "/>
<path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 181.779507 141.859042 L 197.398822 126.241402 M 200.74827 129.590013 L 184.943061 145.39271 " transform="matrix(4.664947,0,0,4.664947,-744.909784,-480.042297)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 193.6875 78.402344 C 180.496094 74.996094 165.875 78.382813 155.546875 88.707031 C 140.015625 104.238281 140.015625 129.460938 155.546875 144.992188 C 171.078125 160.523438 196.300781 160.523438 211.832031 144.992188 C 222.167969 134.652344 225.5625 120.054688 222.140625 106.851563 L 195.851563 133.136719 L 173.378906 127.160156 L 167.402344 104.6875 Z M 193.6875 78.402344 "/>
<use xlink:href="#image200" transform="matrix(1,0,0,1,250,75)"/>
<rect x="0" y="0" width="825" height="1125" style="fill:rgb(100%,0%,0%);fill-opacity:1;stroke:none;" mask="url(#mask0)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

BIN
spec/samples/expected/backend_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

78
spec/samples/expected/backend_01.svg

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="825pt" height="1125pt" viewBox="0 0 825 1125" version="1.1">
<defs>
<g>
<symbol overflow="visible" id="glyph0-0">
<path style="stroke:none;" d="M 12 0 L 12 -72 L 84 -72 L 84 0 Z M 18 -6 L 78 -6 L 78 -66 L 18 -66 Z M 18 -6 "/>
</symbol>
<symbol overflow="visible" id="glyph0-1">
<path style="stroke:none;" d="M 66 0 L 48 0 L 48 -31 L 25 -31 L 25 0 L 7 0 L 7 -70 L 25 -70 L 25 -44 L 48 -44 L 48 -70 L 66 -70 Z M 66 0 "/>
</symbol>
<symbol overflow="visible" id="glyph0-2">
<path style="stroke:none;" d="M 33.109375 1 C 23.066406 0.996094 15.371094 -1.390625 10.023438 -6.164063 C 4.671875 -10.9375 1.996094 -17.742188 2 -26.578125 C 1.996094 -35.210938 4.496094 -42.105469 9.492188 -47.265625 C 14.484375 -52.417969 21.464844 -54.996094 30.4375 -55 C 38.589844 -54.996094 44.722656 -52.828125 48.835938 -48.5 C 52.941406 -44.164063 54.996094 -37.960938 55 -29.890625 L 55 -24 L 18 -24 C 18.15625 -21.507813 18.683594 -19.425781 19.585938 -17.757813 C 20.484375 -16.082031 21.675781 -14.75 23.15625 -13.765625 C 24.601563 -12.78125 26.289063 -12.078125 28.21875 -11.648438 C 30.144531 -11.214844 32.246094 -10.996094 34.53125 -11 C 36.484375 -10.996094 38.414063 -11.207031 40.3125 -11.625 C 42.207031 -12.039063 43.941406 -12.589844 45.515625 -13.28125 C 46.898438 -13.863281 48.175781 -14.496094 49.351563 -15.179688 C 50.519531 -15.859375 51.476563 -16.464844 52.21875 -17 L 54 -17 L 54 -3.375 C 52.644531 -2.84375 51.402344 -2.351563 50.28125 -1.898438 C 49.152344 -1.445313 47.617188 -0.984375 45.671875 -0.515625 C 43.867188 -0.0390625 42.011719 0.332031 40.101563 0.601563 C 38.1875 0.863281 35.855469 0.996094 33.109375 1 Z M 39 -34 C 38.894531 -37.582031 38.039063 -40.3125 36.4375 -42.1875 C 34.832031 -44.0625 32.367188 -45 29.046875 -45 C 25.65625 -45 23.011719 -44.015625 21.109375 -42.046875 C 19.199219 -40.078125 18.148438 -37.394531 17.953125 -34 Z M 39 -34 "/>
</symbol>
<symbol overflow="visible" id="glyph0-3">
<path style="stroke:none;" d="M 22 0 L 6 0 L 6 -73 L 22 -73 Z M 22 0 "/>
</symbol>
<symbol overflow="visible" id="glyph0-4">
<path style="stroke:none;" d="M 57 -26.46875 C 57 -17.640625 54.605469 -10.691406 49.820313 -5.617188 C 45.03125 -0.539063 38.257813 1.996094 29.5 2 C 20.808594 1.996094 14.054688 -0.539063 9.234375 -5.617188 C 4.410156 -10.691406 1.996094 -17.640625 2 -26.46875 C 1.996094 -35.390625 4.410156 -42.378906 9.234375 -47.429688 C 14.054688 -52.472656 20.808594 -54.996094 29.5 -55 C 38.226563 -54.996094 44.992188 -52.457031 49.796875 -47.382813 C 54.597656 -42.300781 57 -35.328125 57 -26.46875 Z M 40 -26.375 C 39.996094 -29.558594 39.734375 -32.214844 39.21875 -34.335938 C 38.695313 -36.453125 37.972656 -38.148438 37.046875 -39.421875 C 36.066406 -40.753906 34.960938 -41.683594 33.726563 -42.210938 C 32.492188 -42.734375 31.082031 -42.996094 29.5 -43 C 28.007813 -42.996094 26.660156 -42.765625 25.460938 -42.304688 C 24.253906 -41.839844 23.148438 -40.957031 22.140625 -39.65625 C 21.179688 -38.414063 20.417969 -36.710938 19.851563 -34.546875 C 19.28125 -32.378906 18.996094 -29.652344 19 -26.375 C 18.996094 -23.101563 19.265625 -20.453125 19.804688 -18.429688 C 20.339844 -16.398438 21.035156 -14.78125 21.890625 -13.578125 C 22.785156 -12.335938 23.894531 -11.429688 25.226563 -10.859375 C 26.550781 -10.28125 28.023438 -9.996094 29.640625 -10 C 30.972656 -9.996094 32.328125 -10.28125 33.703125 -10.859375 C 35.078125 -11.429688 36.175781 -12.289063 37 -13.4375 C 37.988281 -14.796875 38.734375 -16.445313 39.242188 -18.375 C 39.742188 -20.300781 39.996094 -22.964844 40 -26.375 Z M 40 -26.375 "/>
</symbol>
<symbol overflow="visible" id="glyph0-5">
<path style="stroke:none;" d="M 26 -18 L 9.84375 18 L 0 18 L 9.09375 -18 Z M 26 -18 "/>
</symbol>
<symbol overflow="visible" id="glyph0-6">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph0-7">
<path style="stroke:none;" d="M 84 -53 L 68.8125 0 L 51.578125 0 L 42.453125 -34.265625 L 33.28125 0 L 16.046875 0 L 1 -53 L 17.625 -53 L 26.015625 -17.9375 L 35.875 -53 L 50.1875 -53 L 59.5 -17.9375 L 67.359375 -53 Z M 84 -53 "/>
</symbol>
<symbol overflow="visible" id="glyph0-8">
<path style="stroke:none;" d="M 42 -38 L 40.5625 -38 C 39.902344 -38.328125 38.945313 -38.578125 37.695313 -38.75 C 36.4375 -38.914063 35.050781 -39 33.53125 -39 C 31.714844 -39 29.8125 -38.742188 27.820313 -38.226563 C 25.824219 -37.710938 23.882813 -37.097656 22 -36.390625 L 22 0 L 6 0 L 6 -53 L 22 -53 L 22 -45.234375 C 22.789063 -45.921875 23.886719 -46.789063 25.289063 -47.84375 C 26.6875 -48.890625 27.964844 -49.730469 29.125 -50.359375 C 30.382813 -51.085938 31.847656 -51.707031 33.515625 -52.226563 C 35.179688 -52.738281 36.75 -52.996094 38.234375 -53 C 38.792969 -52.996094 39.421875 -52.980469 40.117188 -52.953125 C 40.808594 -52.917969 41.4375 -52.878906 42 -52.828125 Z M 42 -38 "/>
</symbol>
<symbol overflow="visible" id="glyph0-9">
<path style="stroke:none;" d="M 54 0 L 38 0 L 38 -5.484375 C 36.914063 -4.609375 35.679688 -3.671875 34.289063 -2.671875 C 32.898438 -1.671875 31.675781 -0.921875 30.625 -0.421875 C 29.277344 0.328125 27.949219 0.917969 26.640625 1.351563 C 25.324219 1.78125 23.757813 1.996094 21.9375 2 C 15.800781 1.996094 10.941406 -0.550781 7.367188 -5.648438 C 3.785156 -10.746094 1.996094 -17.558594 2 -26.09375 C 1.996094 -30.796875 2.605469 -34.882813 3.820313 -38.351563 C 5.03125 -41.8125 6.710938 -44.832031 8.859375 -47.40625 C 10.804688 -49.738281 13.167969 -51.585938 15.953125 -52.953125 C 18.730469 -54.3125 21.667969 -54.996094 24.765625 -55 C 27.574219 -54.996094 29.882813 -54.707031 31.695313 -54.132813 C 33.5 -53.550781 35.601563 -52.652344 38 -51.4375 L 38 -73 L 54 -73 Z M 38 -14.3125 L 38 -41.515625 C 37.164063 -41.9375 36.070313 -42.292969 34.71875 -42.578125 C 33.359375 -42.855469 32.199219 -42.996094 31.234375 -43 C 27.167969 -42.996094 24.113281 -41.546875 22.070313 -38.65625 C 20.019531 -35.757813 18.996094 -31.707031 19 -26.5 C 18.996094 -21.039063 19.8125 -17.089844 21.445313 -14.65625 C 23.074219 -12.214844 25.707031 -10.996094 29.34375 -11 C 30.820313 -10.996094 32.316406 -11.292969 33.835938 -11.890625 C 35.347656 -12.480469 36.734375 -13.289063 38 -14.3125 Z M 38 -14.3125 "/>
</symbol>
<symbol overflow="visible" id="glyph0-10">
<path style="stroke:none;" d="M 25 -70 L 23.140625 -20 L 8.859375 -20 L 7 -70 Z M 25 0 L 7 0 L 7 -12 L 25 -12 Z M 25 0 "/>
</symbol>
</g>
<image id="image200" width="128" height="128" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAQAAABpN6lAAAAAAmJLR0QAxtiKRLcAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfeCAwPOiprCHMUAAAM90lEQVR42uVda3RVxRX+EiLhFRACYrQEjBheN0VABQlgKiDlbVCqxQd0UaiiRRHBroWg1UVVFGm6LGhXrNJSwSoiWhQDKBKCouIDEiERoiGoaJSXEkFDvv7gcnPOvWfmzMyZG2O7Z2Wtm3P27Nl7n3ns2bNnJoHwhzIUYlto56N7s6tQjRNoyJCCdkgv6nZDn+KByFTAT6CP6MuwisX4aUIIuQnX+qmBwlSE8bMlr38yafzsIslrweNKTMz9XxD+VJqYW6mjgHykGBTSrEGrIIX5qgq4MWRWxNwGrgLwxpCCAkY8YUp+OHc1+KYw4gkfBeRsNifemmSeQb4N9aqCnM0SBZh//ZPpOMlfauaZTPKuH7EWWGj7dWkjSbKtRo4kUjuP3b7A0fMHJ3w/SbJCI8fysAIKlbDTrakgP1oBlUYDX3S6PCzOckX83qyDMb7YV3GKxUGx0q0AO2bPmRFxrlfC3+dQwFEf3FSSo62aRg4FFMEW2TrI8MWdRTf8RYpdRvISqz1BUZ0C7Nn8b0TEOeCD2ZKxcI4QexFJ8nzLc4SwAkphj+gihzjrpZhrPRSwQ4A7wFdBZqkURCKwzOIE9E3H78G4XYg3GMM8p6+TPJ4m49XwryOWp8vLTk6HQxZ12jHqm/YS4B2kN9SykaRZJVmuASESVhuAuxskyWNM9sC5j2JYFoU72/HOvklUCisGkDO9GyXQuzEYaZSDs6vr5npjXwH5SNwWstuu3oj6vxcejHqy2ofCC47fWxy/j8fBabYtFGj+55Wu9/img52DD/1hZhh3tevpF3GZGyLDMslMT5Fau2aM/pDlocqyOCgggwkp/MZytfLyM5fjAly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mZ5NyPE+FQPxvpcd5pFkU33XNjq2LlupW5f0uXespUMBI6dkAQ6yJH3PRkp2rtk7BKgXcfxrsD8q0poB8L3dA0MvWmkecmSrYjXgiRgGpcTB1vA1ggT8k2HV7Jw9LKlfGn6S8vGY3Ca/bI4JduDiW5AE21sjhnNN/UU/iSy9cDFYLbmONZiU+x6GAfj/C1xe4BE37gsd4nnaeU2dVraz3ti/1iZpdu3u6EVNHSZJN4i68xrW7J+2C+rp4eTTJaXEvRfPiZYYN5Pq5evvRONOXX739f3/5eoLKylgZCrEttPPRvdlVqMaJBi10CtohvajbDX2KB/rdOw8A+C/P9iz7dYa7BgAAAABJRU5ErkJggg=="/>
<filter id="alpha" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feColorMatrix type="matrix" in="SourceGraphic" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
</filter>
<mask id="mask0">
<g filter="url(#alpha)">
<use xlink:href="#image200" transform="matrix(1,0,0,1,250,250)"/>
</g>
</mask>
</defs>
<g id="surface196">
<rect x="0" y="0" width="825" height="1125" style="fill:rgb(50.196078%,50.196078%,50.196078%);fill-opacity:1;stroke:none;"/>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph0-1" x="106" y="596"/>
<use xlink:href="#glyph0-2" x="179" y="596"/>
<use xlink:href="#glyph0-3" x="236" y="596"/>
<use xlink:href="#glyph0-3" x="265" y="596"/>
<use xlink:href="#glyph0-4" x="294" y="596"/>
<use xlink:href="#glyph0-5" x="353" y="596"/>
<use xlink:href="#glyph0-6" x="383" y="596"/>
<use xlink:href="#glyph0-7" x="411" y="596"/>
<use xlink:href="#glyph0-4" x="496" y="596"/>
<use xlink:href="#glyph0-8" x="555" y="596"/>
<use xlink:href="#glyph0-3" x="597" y="596"/>
<use xlink:href="#glyph0-9" x="626" y="596"/>
<use xlink:href="#glyph0-10" x="686" y="596"/>
</g>
<path style="fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 76 38 L 750 38 C 769 38 788 57 788 76 L 788 1050 C 788 1069 769 1088 750 1088 L 76 1088 C 57 1088 38 1069 38 1050 L 38 76 C 38 57 57 38 76 38 Z M 76 38 "/>
<path style="fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 125 400 C 125 413.808594 113.808594 425 100 425 C 86.191406 425 75 413.808594 75 400 C 75 386.191406 86.191406 375 100 375 C 113.808594 375 125 386.191406 125 400 "/>
<path style="fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 100 425 L 125 475 L 75 475 Z M 100 425 "/>
<path style="fill:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 100 620 L 720 620 "/>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:10.625396;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 72.416536 -378.68698 L 439.575917 -378.68698 C 476.648655 -378.68698 506.694943 -348.640692 506.694943 -311.583603 L 506.694943 55.575778 C 506.694943 92.648516 476.648655 122.694804 439.575917 122.694804 L 72.416536 122.694804 C 35.359447 122.694804 5.313159 92.648516 5.313159 55.575778 L 5.313159 -311.583603 C 5.313159 -348.640692 35.359447 -378.68698 72.416536 -378.68698 Z M 72.416536 -378.68698 " transform="matrix(0.249615,0,0,0.249615,100.197194,171.049335)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 109.25 169.125 C 104.289063 172.332031 101 177.90625 101 184.25 C 101 194.191406 109.058594 202.25 119 202.25 C 124.957031 202.25 130.222656 199.335938 133.5 194.875 C 130.6875 196.691406 127.34375 197.75 123.75 197.75 C 113.808594 197.75 105.75 189.691406 105.75 179.75 C 105.75 175.765625 107.058594 172.105469 109.25 169.125 Z M 109.25 169.125 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 151.84375 123.230469 L 105.195313 169.878906 L 105.195313 195.828125 L 130.269531 195.828125 L 177.355469 148.742188 Z M 151.84375 123.230469 "/>
<path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 181.779507 141.859042 L 197.398822 126.241402 M 200.74827 129.590013 L 184.943061 145.39271 " transform="matrix(4.664947,0,0,4.664947,-744.909784,-480.042297)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 193.6875 78.402344 C 180.496094 74.996094 165.875 78.382813 155.546875 88.707031 C 140.015625 104.238281 140.015625 129.460938 155.546875 144.992188 C 171.078125 160.523438 196.300781 160.523438 211.832031 144.992188 C 222.167969 134.652344 225.5625 120.054688 222.140625 106.851563 L 195.851563 133.136719 L 173.378906 127.160156 L 167.402344 104.6875 Z M 193.6875 78.402344 "/>
<use xlink:href="#image200" transform="matrix(1,0,0,1,250,75)"/>
<rect x="0" y="0" width="825" height="1125" style="fill:rgb(100%,0%,0%);fill-opacity:1;stroke:none;" mask="url(#mask0)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

BIN
spec/samples/expected/basic_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
spec/samples/expected/basic_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
spec/samples/expected/basic_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
spec/samples/expected/cairo_access_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
spec/samples/expected/cairo_access_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
spec/samples/expected/card_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
spec/samples/expected/card_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
spec/samples/expected/colors_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
spec/samples/expected/config_disable_text_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
spec/samples/expected/config_text_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
spec/samples/expected/custom-config_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
spec/samples/expected/embed_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
spec/samples/expected/embed_multi_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
spec/samples/expected/embed_multi_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
spec/samples/expected/embed_multi_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
spec/samples/expected/embed_multisheet_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

0
spec/samples/expected/gitkeep.txt

BIN
spec/samples/expected/gradient_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
spec/samples/expected/landscape_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
spec/samples/expected/layout2_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
spec/samples/expected/layout_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
spec/samples/expected/layout_builtin_hand_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
spec/samples/expected/layout_builtin_playing_card_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
spec/samples/expected/load_images_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
spec/samples/expected/portrait_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
spec/samples/expected/ranges_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
spec/samples/expected/ranges_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
spec/samples/expected/ranges_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
spec/samples/expected/sample_csv_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
spec/samples/expected/sample_csv_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
spec/samples/expected/sample_excel_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
spec/samples/expected/sample_excel_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
spec/samples/expected/sample_excel_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
spec/samples/expected/save_sheet_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
spec/samples/expected/save_sheet_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
spec/samples/expected/save_sheet_range_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
spec/samples/expected/save_sheet_range_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
spec/samples/expected/save_single_sheet_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
spec/samples/expected/saves_notrim_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
spec/samples/expected/shape_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
spec/samples/expected/showcase.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

BIN
spec/samples/expected/showcase2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 KiB

BIN
spec/samples/expected/showcase_individual_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
spec/samples/expected/showcase_individual_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
spec/samples/expected/showcase_individual_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
spec/samples/expected/showcase_individual_03.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
spec/samples/expected/text_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
spec/samples/expected/text_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
spec/samples/expected/text_02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
spec/samples/expected/tgc_sample_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
spec/samples/expected/units_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

33
spec/samples/sanity.html.erb

@ -0,0 +1,33 @@
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Squib Sanity Test for v<%=Squib::VERSION%></title>
<style>
body{
background-color: #dedede;
font-color: white;
}
table, td, tr{
border: 1px solid black;
border-collapse: true;
}
img{
width: 30%;
}
</style>
</head>
<body>
<% count = 0 %>
<% images.each do |exp, actual| %>
<img src="<%=exp %>">&nbsp;
<img src="<%=actual %>">&nbsp;
<br>
<%=exp %>
<hr>
<% count += 1 %>
<% end %>
</table>
<body>
</html>

45
spec/samples/sanity.rb

@ -0,0 +1,45 @@
require 'launchy'
require 'erb'
# An pixel-by-pixel comparison of sample images for visual regression testing
class Sanity
@@EXPECTED_DIR = "#{File.expand_path(File.dirname(__FILE__))}/expected/"
@@OUTPUT_DIR = "#{File.expand_path(File.dirname(__FILE__))}/../../samples/_output/"
@@SANITY_ERB = "#{File.expand_path(File.dirname(__FILE__))}/sanity.html.erb"
@@SANITY_HTML = "#{File.expand_path(File.dirname(__FILE__))}/sanity.html"
def images
images = {}
Dir[@@EXPECTED_DIR + "/**/*.png"].each do |exp_png|
images["file:///" + exp_png] = "file:///" + @@OUTPUT_DIR + File.basename(exp_png)
end
return images
end
def run
puts "Building sanity test..."
sanity_template = File.read(@@SANITY_ERB)
process_erb(sanity_template)
# render_markdown(sanity_template)
Launchy.open("file:///" + @@SANITY_HTML)
puts "Done."
end
private
def process_erb(sanity_template)
renderer = ERB.new(sanity_template)
File.open(@@SANITY_HTML, 'w+') do |html|
html.write(renderer.result(binding))
end
end
# def render_markdown(sanity_template)
# md = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true)
# File.open(@@SANITY_HTML, 'w+') do |html|
# html.write(md.render(sanity_template))
# end
# end
end

1
squib.gemspec

@ -42,5 +42,6 @@ Gem::Specification.new do |spec|
# spec.add_development_dependency 'yard', '~> 0.8'
spec.add_development_dependency 'coveralls'
spec.add_development_dependency 'byebug'
spec.add_development_dependency 'launchy'
end

Loading…
Cancel
Save