lib/recursiveUpdateUntil: add a test & release note for fix
This commit is contained in:
parent
b63ec64521
commit
d817452e29
@ -213,6 +213,30 @@ runTests {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# ATTRSETS
|
||||||
|
|
||||||
|
# code from the example
|
||||||
|
testRecursiveUpdateUntil = {
|
||||||
|
expr = recursiveUpdateUntil (path: l: r: path == ["foo"]) {
|
||||||
|
# first attribute set
|
||||||
|
foo.bar = 1;
|
||||||
|
foo.baz = 2;
|
||||||
|
bar = 3;
|
||||||
|
} {
|
||||||
|
#second attribute set
|
||||||
|
foo.bar = 1;
|
||||||
|
foo.quz = 2;
|
||||||
|
baz = 4;
|
||||||
|
};
|
||||||
|
expected = {
|
||||||
|
foo.bar = 1; # 'foo.*' from the second set
|
||||||
|
foo.quz = 2; #
|
||||||
|
bar = 3; # 'bar' from the first set
|
||||||
|
baz = 4; # 'baz' from the second set
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# GENERATORS
|
# GENERATORS
|
||||||
# these tests assume attributes are converted to lists
|
# these tests assume attributes are converted to lists
|
||||||
# in alphabetical order
|
# in alphabetical order
|
||||||
|
@ -278,6 +278,8 @@ inherit (pkgs.nixos {
|
|||||||
<literal>lib.traceCallXml</literal> has been deprecated. Please complain
|
<literal>lib.traceCallXml</literal> has been deprecated. Please complain
|
||||||
if you use the function regularly.
|
if you use the function regularly.
|
||||||
</para>
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The attribute <literal>lib.nixpkgsVersion</literal> has been deprecated in
|
The attribute <literal>lib.nixpkgsVersion</literal> has been deprecated in
|
||||||
favor of <literal>lib.version</literal>. Please refer to the discussion in
|
favor of <literal>lib.version</literal>. Please refer to the discussion in
|
||||||
@ -285,6 +287,13 @@ inherit (pkgs.nixos {
|
|||||||
for further reference.
|
for further reference.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>lib.recursiveUpdateUntil</literal> was not acting according to its
|
||||||
|
specification. It has been fixed to act according to the docstring, and a
|
||||||
|
test has been added.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The module for <option>security.dhparams</option> has two new options now:
|
The module for <option>security.dhparams</option> has two new options now:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user