aboutsummaryrefslogtreecommitdiffstats
path: root/commands/execenv/env_testing.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-01-14 20:02:52 +0100
committerMichael Muré <batolettre@gmail.com>2023-01-17 20:19:54 +0100
commit9fc8dbf4e167ae3d3a5fd602df74645e07d79679 (patch)
tree0372489d26994489fa3e7c29c069cac2094575e6 /commands/execenv/env_testing.go
parente689cc506775ec1daccaae9ec35c7a28b48b2f05 (diff)
downloadgit-bug-9fc8dbf4e167ae3d3a5fd602df74645e07d79679.tar.gz
command: adapt the output of the bug list to the terminal size
Diffstat (limited to 'commands/execenv/env_testing.go')
-rw-r--r--commands/execenv/env_testing.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/commands/execenv/env_testing.go b/commands/execenv/env_testing.go
index 03fe0430..15d7b646 100644
--- a/commands/execenv/env_testing.go
+++ b/commands/execenv/env_testing.go
@@ -20,14 +20,14 @@ type TestIn struct {
forceIsTerminal bool
}
-func (t *TestIn) ForceIsTerminal(value bool) {
- t.forceIsTerminal = value
-}
-
func (t *TestIn) IsTerminal() bool {
return t.forceIsTerminal
}
+func (t *TestIn) ForceIsTerminal(value bool) {
+ t.forceIsTerminal = value
+}
+
var _ Out = &TestOut{}
type TestOut struct {
@@ -60,6 +60,10 @@ func (te *TestOut) IsTerminal() bool {
return te.forceIsTerminal
}
+func (te *TestOut) Width() int {
+ return 80
+}
+
func (te *TestOut) Raw() io.Writer {
return te.Buffer
}