EliziumNet / Loopz

PowerShell iteration utilities with additional tools like the Parameter Set Tools
https://eliziumnet.github.io/Loopz/
MIT License
3 stars 0 forks source link

Show-Header: should use Format-StructuredLine #102

Closed plastikfan closed 3 years ago

plastikfan commented 3 years ago

There is a test that generates the following output"

====== *** [ The monarch will be crowned The monarch will be crowned The monarch will be crowned The monarch will be crowned ] *** ===

This has shown up the fact that there is a missing test, ie one that checks that multi character 'open' and 'close' entries in the Krayloa theme which would check that the overflowing message is truncated successfully.

plastikfan commented 3 years ago

Actually, thre is a test for mutli-character open/close (show-header.tests.ps1):

"and: multi-char open & close"/"should: display header with message"

====== [ The monarch will be crowned The monarch will be crowne ... ] ===

plastikfan commented 3 years ago

Also, Show-Header does already use Format-StructuredLine, but it only uses it for the alternative line, when no properties have been defined ('LOOPZ.HEADER.PROPERTIES'). The only minor issue here is that its not currently using the Truncate flag.