mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Format .nix files
... with nixfmt (rfc style)
This commit is contained in:
parent
ba6425a7d0
commit
96e550efc5
266 changed files with 7460 additions and 5138 deletions
|
@ -8,22 +8,34 @@ let
|
|||
|
||||
in
|
||||
|
||||
assert matches "foobar" "foobar";
|
||||
assert matches "fo*" "f";
|
||||
assert matches "foobar" "foobar";
|
||||
assert matches "fo*" "f";
|
||||
assert !matches "fo+" "f";
|
||||
assert matches "fo*" "fo";
|
||||
assert matches "fo*" "foo";
|
||||
assert matches "fo+" "foo";
|
||||
assert matches "fo{1,2}" "foo";
|
||||
assert matches "fo*" "fo";
|
||||
assert matches "fo*" "foo";
|
||||
assert matches "fo+" "foo";
|
||||
assert matches "fo{1,2}" "foo";
|
||||
assert !matches "fo{1,2}" "fooo";
|
||||
assert !matches "fo*" "foobar";
|
||||
assert matches "[[:space:]]+([^[:space:]]+)[[:space:]]+" " foo ";
|
||||
assert matches "[[:space:]]+([^[:space:]]+)[[:space:]]+" " foo ";
|
||||
assert !matches "[[:space:]]+([[:upper:]]+)[[:space:]]+" " foo ";
|
||||
|
||||
assert match "(.*)\\.nix" "foobar.nix" == [ "foobar" ];
|
||||
assert match "[[:space:]]+([[:upper:]]+)[[:space:]]+" " FOO " == [ "FOO" ];
|
||||
|
||||
assert splitFN "/path/to/foobar.nix" == [ "/path/to/" "/path/to" "foobar" "nix" ];
|
||||
assert splitFN "foobar.cc" == [ null null "foobar" "cc" ];
|
||||
assert
|
||||
splitFN "/path/to/foobar.nix" == [
|
||||
"/path/to/"
|
||||
"/path/to"
|
||||
"foobar"
|
||||
"nix"
|
||||
];
|
||||
assert
|
||||
splitFN "foobar.cc" == [
|
||||
null
|
||||
null
|
||||
"foobar"
|
||||
"cc"
|
||||
];
|
||||
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue