Monday, May 21, 2007

 

CppUnit and Emacs

Few people will understand or care about this posting, but it's a code snippet I'll want to be able to find again someday.

Add this to .emacs so that Emacs can parse test-failure messages generated by a CppUnit-based unit test application:

(require 'compile)
(setq compilation-error-regexp-alist
      (cons '("\\(!!!FAILURES!!!\nTest Results:\nRun: [^\n]*\n\n\n\\)?\\([0-9]+\\)) test: \\([^(]+\\)(F) line: \\([0-9]+\\) \\([^ \n]+\\)" 5 4)
            compilation-error-regexp-alist))

Comments:
Thanks for posting this, pretty close to the top of google when querying "cppunit emacs"...
 
Thanks Chris, just what I needed.
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?