prism-tap.js 525 B

12345678910111213141516171819202122
  1. // https://en.wikipedia.org/wiki/Test_Anything_Protocol
  2. Prism.languages.tap = {
  3. 'fail': /not ok[^#{\n\r]*/,
  4. 'pass': /ok[^#{\n\r]*/,
  5. 'pragma': /pragma [+-][a-z]+/,
  6. 'bailout': /bail out!.*/i,
  7. 'version': /TAP version \d+/i,
  8. 'plan': /\b\d+\.\.\d+(?: +#.*)?/,
  9. 'subtest': {
  10. pattern: /# Subtest(?:: .*)?/,
  11. greedy: true
  12. },
  13. 'punctuation': /[{}]/,
  14. 'directive': /#.*/,
  15. 'yamlish': {
  16. pattern: /(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,
  17. lookbehind: true,
  18. inside: Prism.languages.yaml,
  19. alias: 'language-yaml'
  20. }
  21. };