Skip to content

Commit 3e8a6cb

Browse files
committed
allow flexibility in console width
1 parent 9c19f86 commit 3e8a6cb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2828
- Run tests on push as well as on a pull request so developers can see impact
2929
- `ArduinoBackend` now exposes `config_file_path` instead of `config_dir` so that we can be explicit about [strange behavior in `arduino-cli` that isn't going to change anytime soon](https://github.com/arduino/arduino-cli/issues/753)
3030
- Use `arduino-cli` version `0.29.0` as the backend
31+
- Test runner detects console width if possible, allowing variable width from 80-132 chars
3132

3233
### Deprecated
3334

exe/arduino_ci.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
require 'set'
44
require 'pathname'
55
require 'optparse'
6+
require 'io/console'
67

7-
WIDTH = 80
8+
# be flexible between 80 and 132 cols of output
9+
WIDTH = begin
10+
[132, [80, IO::console.winsize[1] - 2].max].min
11+
rescue NoMethodError
12+
80
13+
end
814
VAR_CUSTOM_INIT_SCRIPT = "CUSTOM_INIT_SCRIPT".freeze
915
VAR_USE_SUBDIR = "USE_SUBDIR".freeze
1016
VAR_EXPECT_EXAMPLES = "EXPECT_EXAMPLES".freeze

0 commit comments

Comments
 (0)