1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-30 12:07:46 +00:00

test: add more apply cases

This commit is contained in:
Kevin Amado 2022-03-02 15:50:44 -05:00
parent 4c7379772d
commit 17336602d6
3 changed files with 197 additions and 24 deletions

View file

@ -1,5 +1,8 @@
[profile.release]
lto = true
[profile.dev]
opt-level = 2
[workspace]
members = ["src/*"]

View file

@ -1,4 +1,91 @@
(a b)
(a b)
(a /*b*/ c)
(/*a*/ b /*c*/ d /*e*/)
[
(
(a b)
(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;
}
]

View file

@ -1,20 +1,103 @@
(a b)
(a b)
(a
/*
b
*/
c)
(
/*
a
*/
b
/*
c
*/
d
/*
e
*/
)
[
((a b)
(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;
}
]