diff options
author | Arun Isaac | 2023-11-06 15:06:40 +0000 |
---|---|---|
committer | Arun Isaac | 2023-11-06 15:06:40 +0000 |
commit | 276d896c282a9c692507f20dac25569149d31c9f (patch) | |
tree | 4a69f7c2045012f16ffc61ed52738bfb159857ba /build-aux | |
parent | d07493fbbccbf14b0230a77c992e52e048089d54 (diff) | |
download | ccwl-276d896c282a9c692507f20dac25569149d31c9f.tar.gz ccwl-276d896c282a9c692507f20dac25569149d31c9f.tar.lz ccwl-276d896c282a9c692507f20dac25569149d31c9f.zip |
Use (term ansi-color) for colors.
* build-aux/test-driver.scm (color): Use colorize-string from (term
ansi-color).
* ccwl/ui.scm (report-formatted-message, source-in-context,
report-ccwl-violation): Use colorize-string from (term ansi-color).
(color, bold, red, magenta): Delete functions.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/test-driver.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/build-aux/test-driver.scm b/build-aux/test-driver.scm index 8fc5236..adac481 100644 --- a/build-aux/test-driver.scm +++ b/build-aux/test-driver.scm @@ -28,16 +28,17 @@ (use-modules (ice-9 format) (ice-9 match) (srfi srfi-26) - (srfi srfi-64)) + (srfi srfi-64) + (term ansi-color)) -(define (color code str color?) +(define (color color-symbol str color?) (if color? - (format #f "~a[~am~a~a[0m" #\esc code str #\esc) + (colorize-string str color-symbol) str)) -(define red (cut color 31 <> <>)) -(define green (cut color 32 <> <>)) -(define magenta (cut color 35 <> <>)) +(define red (cut color 'RED <> <>)) +(define green (cut color 'GREEN <> <>)) +(define magenta (cut color 'MAGENTA <> <>)) (define (my-gnu-runner color?) (let ((runner (test-runner-null))) |