library(testit) assert('detect_pattern() automatically detects syntax patterns', { (detect_pattern('<<>>=') %==% 'rnw') (detect_pattern('<>=') %==% 'rnw') (detect_pattern('% begin.rcode') %==% 'tex') (detect_pattern('