mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
Handle long strings, embedded new lines and empty descriptions
This commit is contained in:
parent
59b6aafadb
commit
f22cf1fd38
2 changed files with 23 additions and 6 deletions
|
@ -95,9 +95,13 @@ cat >flake.nix<<EOF
|
|||
aNoDescription = import ./simple.nix;
|
||||
bOneLineDescription = import ./simple.nix // { meta.description = "one line"; };
|
||||
cMultiLineDescription = import ./simple.nix // { meta.description = ''
|
||||
line one
|
||||
line one
|
||||
line two
|
||||
''; };
|
||||
dLongDescription = import ./simple.nix // { meta.description = ''
|
||||
01234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefg
|
||||
''; };
|
||||
eEmptyDescription = import ./simple.nix // { meta.description = ""; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -106,3 +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 '[:] ' '/eEmptyDescription/{print $NF}' ./show-output.txt)" = "package 'simple'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue