subunit.js 751 B

123456789101112131415161718192021222324252627282930313233
  1. module.exports = function(hljs) {
  2. var DETAILS = {
  3. className: 'string',
  4. begin: '\\[\n(multipart)?', end: '\\]\n'
  5. };
  6. var TIME = {
  7. className: 'string',
  8. begin: '\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}\.\\d+Z'
  9. };
  10. var PROGRESSVALUE = {
  11. className: 'string',
  12. begin: '(\\+|-)\\d+'
  13. };
  14. var KEYWORDS = {
  15. className: 'keyword',
  16. relevance: 10,
  17. variants: [
  18. { begin: '^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?' },
  19. { begin: '^progress(:?)(\\s+)?(pop|push)?' },
  20. { begin: '^tags:' },
  21. { begin: '^time:' }
  22. ],
  23. };
  24. return {
  25. case_insensitive: true,
  26. contains: [
  27. DETAILS,
  28. TIME,
  29. PROGRESSVALUE,
  30. KEYWORDS
  31. ]
  32. };
  33. };