sourcegraph/lib/output
Keegan Carruthers-Smith fff4b48497
lib/output: ForceTTY can be used to disable Isatty (#60640)
For tests we do not want to use the detection on os.Stdout to change
what output we capture and assert against. In particular when running
the sg tests for me under emacs's compilation-mode I get failures due to
extra escape codes.

This is a different take on ensuring tests do not have Isatty enabled.
The previous attempt used the passed in writer to determine this.
However, on further inspection of call sites we somewhat regularly
captures the output and then only show it if something went wrong. In
those cases we should preserve Isatty of stdout so the errors look
prettier.

Test Plan: go test -short ./...
2024-02-21 09:18:06 +02:00
..
_examples bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
outputtest lib/output: ForceTTY can be used to disable Isatty (#60640) 2024-02-21 09:18:06 +02:00
block.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
BUILD.bazel migrator: extract non-cli specifics from cli package (#53247) 2023-06-09 18:51:56 +01:00
capabilities.go lib/output: ForceTTY can be used to disable Isatty (#60640) 2024-02-21 09:18:06 +02:00
emoji.go migrator: extract non-cli specifics from cli package (#53247) 2023-06-09 18:51:56 +01:00
line.go lib/output: Remove Style interface (#54163) 2023-06-26 14:32:23 +00:00
logger.go migrator: extract non-cli specifics from cli package (#53247) 2023-06-09 18:51:56 +01:00
noop_writer.go lib: use any instead of interface{} (#35121) 2022-05-09 14:55:38 +00:00
output_unix_test.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
output_unix.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
output_windows.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
output.go lib/output: ForceTTY can be used to disable Isatty (#60640) 2024-02-21 09:18:06 +02:00
pending_simple.go lib: use any instead of interface{} (#35121) 2022-05-09 14:55:38 +00:00
pending_tty.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
pending.go lib: use any instead of interface{} (#35121) 2022-05-09 14:55:38 +00:00
progress_simple.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
progress_tty.go lib/output: add a percentage summary label at the end of progress bar (#37711) 2022-06-29 18:55:17 +00:00
progress_with_status_bars_simple.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
progress_with_status_bars_tty.go dev/sg: fix diff output in Buildkite without using Buildkite condition (#36193) 2022-05-30 11:48:15 -07:00
progress_with_status_bars.go lib: use any instead of interface{} (#35121) 2022-05-09 14:55:38 +00:00
progress.go Extract output pkg from src-cli into lib/output (#20348) 2021-04-23 14:56:33 +00:00
spinner.go Extract output pkg from src-cli into lib/output (#20348) 2021-04-23 14:56:33 +00:00
status_bar.go lib: use any instead of interface{} (#35121) 2022-05-09 14:55:38 +00:00
style.go lib/output: Remove Style interface (#54163) 2023-06-26 14:32:23 +00:00
visible_string_width.go all: run gofmt -s -w from 1.19 (#41629) 2022-09-13 07:44:06 +00:00