25 lines
798 B
Plaintext
25 lines
798 B
Plaintext
[[using-shell-testing-settings]]
|
|
= Settings
|
|
|
|
ifndef::snippets[:snippets: ../../../../src/test/java/org/springframework/shell/docs]
|
|
|
|
Built-in emulation uses terminal width 80 and height 24 by default.
|
|
Changing dimensions is useful if the output would span multiple lines
|
|
and you don't want to handle those cases in a tests.
|
|
|
|
These settings can be changed using properties `spring.shell.test.terminal-width`
|
|
or `spring.shell.test.terminal-height`.
|
|
|
|
[source, java, indent=0]
|
|
----
|
|
include::{snippets}/TestingSnippets.java[tag=testing-shelltest-dimensions-props]
|
|
----
|
|
|
|
`ShellTest` annotation have fields `terminalWidth` and `terminalHeight`
|
|
which can also be used to change dimensions.
|
|
|
|
[source, java, indent=0]
|
|
----
|
|
include::{snippets}/TestingSnippets.java[tag=testing-shelltest-dimensions-field]
|
|
----
|