diff -r bf8f3c788cad -r 763cef799c74 specky/syntax/specrun.vim --- a/specky/syntax/specrun.vim Fri Oct 01 08:16:47 2010 -0700 +++ b/specky/syntax/specrun.vim Sat Dec 18 00:56:09 2010 -0800 @@ -1,5 +1,6 @@ " -" specky: syntax highlighting for the 'spec' script output +" specky: syntax highlighting for rspec test output, using the +" custom specky formatter. (rspec 2.x) " $Id$ " @@ -8,68 +9,48 @@ endif " Command line as it was called, inserted by Specky -" syntax match specSpeckyCmd /^Output of: .*/ -highlight link specSpeckyCmd Question -"syntax match WarningMsg /\.\./ - -" Plain output block (...P..F...) -" -syntax region specPlain start="^[\.PF]\+" end="^$" contains=specFailedPlain,specPendingPlain -highlight link specPlain MoreMsg - -" Passed specs (specdoc output) -" -syntax match specPassed /^- .*/ contains=specFailed,specPending -highlight link specPassed MoreMsg -" Pending specs (specdoc output) -" -syntax match specPending /.*PENDING: .*)$/ contained -highlight link specPending Function -" -" (Plain output) -syntax match specPendingPlain /P/ contained -highlight link specPendingPlain Function +" Pending specs that somehow pass +syntax keyword specCallout FIXED -" Failed specs (specdoc output) -" -syntax match specFailed /.*\(FAILED\|ERROR\) - \d\+)/ contained -highlight link specFailed WarningMsg -" -" (Plain output) -syntax match specFailedPlain /F/ contained -highlight link specFailedPlain WarningMsg - -" Warning details -" -syntax region specFailedDetails start="^\d\+)" end="^$" fold -highlight link specFailedDetails WarningMsg +" Passed specs +syntax match specPassed /.*(\d\+.\d\+s)/ contains=specDuration,specBoxLine +syntax keyword specPassedKeyword Succeeded " Pending specs -" -syntax region specPendingDetails start="^Pending:" end="^$" fold -highlight link specPendingDetails Function +syntax match specPending /.*PENDING: .*)$/ contains=specDuration,specBoxLine +syntax keyword specPendingKeyword Pending + +" Failed specs +syntax match specFailed /.*FAILED - #\d\+)/ contains=specDuration,specBoxLine +syntax keyword specFailedKeyword Failed -" Timing information -" -syntax match specTimedRun /^Finished in.*/ -highlight link specTimedRun Question +" Failure details +syntax region specFailedDetails start="^FAILURE - #\d\+)" end="^$" fold contains=specCallout + +" Boxes +syntax match specBox /^\(\s\+\)\?\(+[+-]\+\||.*|\)$/ contains=specFailedKeyword,specDurationKeyword,specPendingKeyword,specPassedKeyword,specBoxContent +syntax match specBoxContent /[a-zA-Z0-9]\+/ contained +syntax match specBoxLine /^\(\s\+\)\?|/ contained -" Status summary -" -syntax match specExamplesTotal /^\d\+ examples, .\+/ contains=specTotalFailed,specNoFailures,specTotalPending -highlight link specExamplesTotal Special -" -syntax match specTotalFailed /\d\+ failure\%[s]/ contained -highlight link specTotalFailed WarningMsg -" -syntax match specTotalPending /\d pending/ contained -highlight link specTotalPending Function -" -syntax match specNoFailures /0 failures/ contained -highlight link specNoFailures MoreMsg +" Spec timing +" syntax match specDuration /\d\+\.\d\+s/ contained +" syntax keyword specDurationKeyword Duration +highlight def link specSpeckyCmd Question +highlight def link specCallout Todo +highlight def link specPassed MoreMsg +highlight def link specPassedKeyword specPassed +highlight def link specPending Function +highlight def link specPendingKeyword specPending +highlight def link specFailed WarningMsg +highlight def link specFailedKeyword specFailed +highlight def link specFailedDetails specFailed +highlight def link specDuration Normal +highlight def link specBox LineNr +highlight def link specBoxContent Constant +highlight def link specBoxLine LineNr let b:current_syntax = "specrun"