mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
Merge pull request #11100 from NixOS/pretty-print-idempotent
Pretty print idempotently
This commit is contained in:
commit
b23da1ceca
4 changed files with 69 additions and 0 deletions
29
tests/functional/repl/pretty-print-idempotent.expected
Normal file
29
tests/functional/repl/pretty-print-idempotent.expected
Normal file
|
@ -0,0 +1,29 @@
|
|||
Nix <nix version>
|
||||
Type :? for help.
|
||||
Added <number omitted> variables.
|
||||
|
||||
{ homepage = "https://example.com"; }
|
||||
|
||||
{ homepage = "https://example.com"; }
|
||||
|
||||
{
|
||||
layerOne = { ... };
|
||||
}
|
||||
|
||||
{
|
||||
layerOne = { ... };
|
||||
}
|
||||
|
||||
[ "https://example.com" ]
|
||||
|
||||
[ "https://example.com" ]
|
||||
|
||||
[
|
||||
[ ... ]
|
||||
]
|
||||
|
||||
[
|
||||
[ ... ]
|
||||
]
|
||||
|
||||
|
9
tests/functional/repl/pretty-print-idempotent.in
Normal file
9
tests/functional/repl/pretty-print-idempotent.in
Normal file
|
@ -0,0 +1,9 @@
|
|||
:l pretty-print-idempotent.nix
|
||||
oneDeep
|
||||
oneDeep
|
||||
twoDeep
|
||||
twoDeep
|
||||
oneDeepList
|
||||
oneDeepList
|
||||
twoDeepList
|
||||
twoDeepList
|
19
tests/functional/repl/pretty-print-idempotent.nix
Normal file
19
tests/functional/repl/pretty-print-idempotent.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
oneDeep = {
|
||||
homepage = "https://" + "example.com";
|
||||
};
|
||||
twoDeep = {
|
||||
layerOne = {
|
||||
homepage = "https://" + "example.com";
|
||||
};
|
||||
};
|
||||
|
||||
oneDeepList = [
|
||||
("https://" + "example.com")
|
||||
];
|
||||
twoDeepList = [
|
||||
[
|
||||
("https://" + "example.com")
|
||||
]
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue