mirage / alcotest

A lightweight and colourful test framework
ISC License
454 stars 80 forks source link

Fix reporting terminal dimensions #381

Closed MisterDA closed 1 year ago

MisterDA commented 1 year ago

My intent was to use a bigger default than 80 columns when the CI is detected. Sadly, this would seem to require too big of a refactoring to communicate the default size to the Pp module, which is also why I haven't made the number of columns configurable programmatically, and exposed it only via an environment variable to fix reproducibility issues for the Unix platform. Oddly enough, communicating the bounds to the Format module with Format.set_margin hides the first [OK], [FAIL], etc tag. I've haven't dug why. I've tested that this on macOS, Windows FreeBSD, and Linux.

MisterDA commented 1 year ago

@OlivierNicole has done a nice review for this PR, thanks. I think it can be merged as-is. Does a anyone have an opinion?