From: Tomi Ollila Date: Thu, 6 May 2021 14:12:32 +0000 (+0300) Subject: test: say_color() in one write(2) X-Git-Tag: archive/debian/0.33_rc0-1~71 X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=f2533b9e730c12276c32abe7126d7eabc7fcb8c6;hp=f2533b9e730c12276c32abe7126d7eabc7fcb8c6;p=notmuch test: say_color() in one write(2) say_color() used to call (builtin) printf (and tput(1) to stdout) several times, which caused attempts to write messages with color to have partial content (e.g. escape sequences) often intermixed with other tests when parallel tests were run. Now, with all output collected, then written out using one printf, all strings with color print out correctly ((at least short) write(2)'s appear to write out "atomically"). While at it, used only one tput(1) execution to determine whether color output works, and made bold/colors/sgr0 to tput(1) their values once per test. ---