/extra/mason/report/report-tests.factor

http://github.com/abeaumont/factor · Factor · 30 lines · 23 code · 7 blank · 0 comment · 0 complexity · 948a4cb16b49296b14218de79c8d4b71 MD5 · raw file

  1. IN: mason.report.tests
  2. USING: io.files io.files.temp io.directories kernel mason.report
  3. mason.common mason.config namespaces tools.test xml xml.writer ;
  4. { 0 0 } [ [ ] with-report ] must-infer-as
  5. : verify-report ( -- )
  6. [ t ] [ "report" exists? ] unit-test
  7. [ ] [ "report" file>xml drop ] unit-test
  8. [ ] [ "report" delete-file ] unit-test ;
  9. "builds" temp-file builds-dir [
  10. "resource:extra/mason/report/fake-data/" [
  11. [ ] [
  12. timings-table pprint-xml
  13. ] unit-test
  14. [ ] [ successful-report ] unit-test
  15. verify-report
  16. [ status-error ] [ 1234 compile-failed ] unit-test
  17. verify-report
  18. [ status-error ] [ 1235 boot-failed ] unit-test
  19. verify-report
  20. [ status-error ] [ 1236 test-failed ] unit-test
  21. verify-report
  22. ] with-directory
  23. ] with-variable