pulumi/pkg/backend/display/testdata
Will Jones 1f6724c737
Clean up display rewinding and wrapping (#17007)
The Pulumi CLI supports rendering operations in a number of ways, such
as interactively to the console, or as streams of JSON events. The tree
renderer is one of Pulumi's interactive options, writing trees of parent
and child resources to the terminal as an operation progresses. This
commit pulls out part of #16094 in order to improve the tree renderer in
two ways:

* When the number of lines rendered decreases between renders, old lines
that should no longer be visible must be overwritten. The previous
implementation was buggy in that it did not take system messages into
account when doing this. This commit does.
* When writing system messages, the previous implementation did not trim
output to the terminal width. This commit does.

With no additional changes, these fixes result in changes to the golden
test outputs we maintain as part of the display tests that are not
ASCII-visible. To rectify this and hopefully make these tests more
understandable, this commit also introduces a `mockTermInfo` terminal
info implementation that explicitly prints otherwise-invisible terminal
codes such as "hide cursor", "move cursor up 2 lines" and so on.
Moreover, this commit has been manually testing with a number of real
Pulumi CLI operations to try and avoid breakage of the display.
2024-08-19 15:30:48 +00:00
..
json-yaml Fix JSON/YAML diffs (#15171) 2024-01-18 14:19:54 +00:00
not-truncated Clean up display rewinding and wrapping (#17007) 2024-08-19 15:30:48 +00:00
truncated Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
.gitattributes [cli] Refactor the diff printer. (#9367) 2022-04-09 16:04:35 -07:00