mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-31 12:37:45 +00:00
test: add more apply cases
This commit is contained in:
parent
4c7379772d
commit
17336602d6
3 changed files with 197 additions and 24 deletions
|
@ -1,5 +1,8 @@
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
opt-level = 2
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["src/*"]
|
members = ["src/*"]
|
||||||
|
|
|
@ -1,4 +1,91 @@
|
||||||
(a b)
|
[
|
||||||
(a b)
|
(
|
||||||
(a /*b*/ c)
|
(a b)
|
||||||
(/*a*/ b /*c*/ d /*e*/)
|
(a b)
|
||||||
|
(a /*b*/ c)
|
||||||
|
(/*a*/ b /*c*/ d /*e*/)
|
||||||
|
)
|
||||||
|
''
|
||||||
|
otherModules=${
|
||||||
|
pkgs.writeText "other-modules.json"
|
||||||
|
(l.toJSON
|
||||||
|
(l.mapAttrs
|
||||||
|
(pname: subOutputs:
|
||||||
|
let
|
||||||
|
pkg = subOutputs.packages."${pname}".overrideAttrs (old: {
|
||||||
|
buildScript = "true";
|
||||||
|
installMethod = "copy";
|
||||||
|
});
|
||||||
|
in
|
||||||
|
"${pkg}/lib/node_modules/${pname}/node_modules")
|
||||||
|
outputs.subPackages))
|
||||||
|
}
|
||||||
|
''
|
||||||
|
{
|
||||||
|
name1 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;};
|
||||||
|
|
||||||
|
name2 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;}
|
||||||
|
argument;
|
||||||
|
|
||||||
|
name3 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;}
|
||||||
|
{qwer = 12345;}
|
||||||
|
argument;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name1 = function arg {
|
||||||
|
asdf = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
name2 = function arg {
|
||||||
|
asdf = 1;
|
||||||
|
}
|
||||||
|
argument;
|
||||||
|
|
||||||
|
name3 = function arg {
|
||||||
|
asdf = 1;
|
||||||
|
} {
|
||||||
|
qwer = 12345;
|
||||||
|
}
|
||||||
|
argument;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name4 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;}
|
||||||
|
{
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
argument;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
option1 = function arg {asdf = 1;} {
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
lastArg;
|
||||||
|
|
||||||
|
option2 = function arg {asdf = 1;} {
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
lastArg;
|
||||||
|
|
||||||
|
option3 = function arg {asdf = 1;}
|
||||||
|
{
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
lastArg;
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
|
@ -1,20 +1,103 @@
|
||||||
(a b)
|
[
|
||||||
(a b)
|
((a b)
|
||||||
(a
|
(a b)
|
||||||
/*
|
(a
|
||||||
b
|
/*
|
||||||
*/
|
b
|
||||||
c)
|
*/
|
||||||
(
|
c)
|
||||||
/*
|
(
|
||||||
a
|
/*
|
||||||
*/
|
a
|
||||||
b
|
*/
|
||||||
/*
|
b
|
||||||
c
|
/*
|
||||||
*/
|
c
|
||||||
d
|
*/
|
||||||
/*
|
d
|
||||||
e
|
/*
|
||||||
*/
|
e
|
||||||
)
|
*/
|
||||||
|
))
|
||||||
|
''
|
||||||
|
otherModules=${
|
||||||
|
pkgs.writeText "other-modules.json"
|
||||||
|
(l.toJSON
|
||||||
|
(l.mapAttrs
|
||||||
|
(pname: subOutputs: let
|
||||||
|
pkg = subOutputs.packages."${pname}".overrideAttrs (old: {
|
||||||
|
buildScript = "true";
|
||||||
|
installMethod = "copy";
|
||||||
|
});
|
||||||
|
in "${pkg}/lib/node_modules/${pname}/node_modules")
|
||||||
|
outputs.subPackages))
|
||||||
|
}
|
||||||
|
''
|
||||||
|
{
|
||||||
|
name1 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;};
|
||||||
|
|
||||||
|
name2 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;}
|
||||||
|
argument;
|
||||||
|
|
||||||
|
name3 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;}
|
||||||
|
{qwer = 12345;}
|
||||||
|
argument;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name1 = function arg {
|
||||||
|
asdf = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
name2 = function arg {
|
||||||
|
asdf = 1;
|
||||||
|
}
|
||||||
|
argument;
|
||||||
|
|
||||||
|
name3 = function arg {
|
||||||
|
asdf = 1;
|
||||||
|
} {
|
||||||
|
qwer = 12345;
|
||||||
|
}
|
||||||
|
argument;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name4 =
|
||||||
|
function
|
||||||
|
arg
|
||||||
|
{asdf = 1;}
|
||||||
|
{
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
argument;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
option1 = function arg {asdf = 1;} {
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
lastArg;
|
||||||
|
|
||||||
|
option2 = function arg {asdf = 1;} {
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
lastArg;
|
||||||
|
|
||||||
|
option3 = function arg {asdf = 1;}
|
||||||
|
{
|
||||||
|
qwer = 12345;
|
||||||
|
qwer2 = 54321;
|
||||||
|
}
|
||||||
|
lastArg;
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue