mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
Account for total length of 80
This commit is contained in:
parent
f22cf1fd38
commit
930818bb1d
2 changed files with 3 additions and 3 deletions
|
@ -1269,8 +1269,8 @@ struct CmdFlakeShow : FlakeCommand, MixJSON
|
|||
|
||||
// If the string is too long then resize add ellipses
|
||||
std::string desc;
|
||||
if (length > 80) {
|
||||
trimmed.resize(80);
|
||||
if (length > 77) {
|
||||
trimmed.resize(77);
|
||||
desc = trimmed.append("...");
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -110,5 +110,5 @@ nix flake show > ./show-output.txt
|
|||
test "$(awk -F '[:] ' '/aNoDescription/{print $NF}' ./show-output.txt)" = "package 'simple'"
|
||||
test "$(awk -F '[:] ' '/bOneLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'one line'"
|
||||
test "$(awk -F '[:] ' '/cMultiLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'line one'"
|
||||
test "$(awk -F '[:] ' '/dLongDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - '01234567890123456789012345678901234567890123456789012345678901234567890123456789...'"
|
||||
test "$(awk -F '[:] ' '/dLongDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - '01234567890123456789012345678901234567890123456789012345678901234567890123456...'"
|
||||
test "$(awk -F '[:] ' '/eEmptyDescription/{print $NF}' ./show-output.txt)" = "package 'simple'"
|
||||
|
|
Loading…
Reference in a new issue