First somewhat working version attached... It finds 1387 tests in 328 suites. The original finds 2611 tests in 349 suites. That's because skip-comments is somehow broken. An example where it has an error very early is tests/core/futils.c : (use-modules (ice-9 ftw)) (use-modules (ice-9 regex)) (use-modules (ice-9 getopt-long)) (use-modules (ice-9 rdelim)) (use-modules (ice-9 match)) (use-modules (ice-9 textual-ports)) (use-modules (srfi srfi-1)) (define fname "test/core/futils.c") (define s (call-with-input-file fname get-string-all)) (define (replace needle replacement haystack) "Replace all occurences of NEEDLE in HAYSTACK by REPLACEMENT. NEEDLE is a regular expression." (regexp-substitute/global #f needle haystack 'pre replacement 'post)) (define (skip-comments text) (replace (string-append "//[^\n]*?|" "/[*].*?[*]/|" "'([.]|[^'])*?'|" "\"([.]|[^\"])*?\"") "" text)) (write (skip-comments s)) ; very short, for some reason