Skip to content

Instantly share code, notes, and snippets.

@marciomazza
Last active August 29, 2015 14:02
Show Gist options
  • Save marciomazza/6e297f524da1f9dfda0d to your computer and use it in GitHub Desktop.
Save marciomazza/6e297f524da1f9dfda0d to your computer and use it in GitHub Desktop.
Sublime Text syntax definition for unittest output
// [PackageDev] target_format: plist, ext: tmLanguage
{ "name": "Unittest Output",
"scopeName": "output.unittest",
"patterns": [
{ "match": "FAIL: ([^ ]+) (.+)",
"name": "unittest.fail",
"captures": {
"1": { "name": "entity.name.function" },
"2": { "name": "support.function" }
}
},
{ "match": "(FAILED) \\(failures=(\\d+)\\)",
"name": "unittest.failed",
"captures": {
"1": { "name": "invalid" },
"2": { "name": "variable.parameter" }
}
},
{ "match": "Ran (\\d+) tests (in .+s)",
"name": "unittest.failed",
"captures": {
"1": { "name": "variable.parameter" },
"2": { "name": "comment.number-sign" }
}
},
{ "match": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"name": "location",
"captures": {
"1": { "name": "string" },
"2": { "name": "variable.parameter" }
}
},
{ "match": "FAILED",
"name": "comment.line"
},
{ "match": "OK",
"name": "constant.other"
},
{ "match": "\\.\\.\\.+F\\.+",
"name": "comment.line"
},
{ "match": "\\.\\.\\.\\.+",
"name": "comment.line"
},
{ "match": "---+",
"name": "comment.line"
},
{ "match": "===+",
"name": "comment.line"
},
{ "match": "^Traceback.+$",
"name": "comment.line"
}
],
"uuid": "2db7b3ec-fbea-48fd-a89a-1a2796f213c6"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment