mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
tests: use warning-expectations options
Deprecated the old `test.check*` options.
This commit is contained in:
parent
24e3b11b23
commit
ae612f8249
3 changed files with 26 additions and 10 deletions
|
@ -94,12 +94,15 @@ in
|
||||||
checkWarnings = lib.mkOption {
|
checkWarnings = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = "Whether to check `config.warnings` in the test.";
|
description = "Whether to check `config.warnings` in the test.";
|
||||||
|
apply = x: lib.warnIfNot x "`test.checkWarnings = false` is replaced with `test.warnings = [ ]`." x;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
checkAssertions = lib.mkOption {
|
checkAssertions = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = "Whether to check `config.assertions` in the test.";
|
description = "Whether to check `config.assertions` in the test.";
|
||||||
|
apply =
|
||||||
|
x: lib.warnIfNot x "`test.checkAssertions = false` is replaced with `test.assertions = [ ]`." x;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
|
let
|
||||||
|
expect = expect: value: { inherit expect value; };
|
||||||
|
|
||||||
|
# This plugin is deprecated
|
||||||
|
warnings = [
|
||||||
|
(expect "count" 1)
|
||||||
|
(expect "any" "this plugin is obsolete and will be removed after 24.11.")
|
||||||
|
];
|
||||||
|
in
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
plugins.nvim-osc52.enable = true;
|
plugins.nvim-osc52.enable = true;
|
||||||
|
|
||||||
# Hide warnings, since this plugin is deprecated
|
test = { inherit warnings; };
|
||||||
test.checkWarnings = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
@ -20,7 +28,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hide warnings, since this plugin is deprecated
|
test = { inherit warnings; };
|
||||||
test.checkWarnings = false;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
|
let
|
||||||
|
expect = expect: value: { inherit expect value; };
|
||||||
|
|
||||||
|
# This plugin is deprecated
|
||||||
|
warnings = [
|
||||||
|
(expect "count" 1)
|
||||||
|
(expect "any" "The `rust-tools` project has been abandoned.")
|
||||||
|
];
|
||||||
|
in
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
# Plugin deprecated
|
test = { inherit warnings; };
|
||||||
test.checkWarnings = false;
|
|
||||||
plugins.rust-tools.enable = true;
|
plugins.rust-tools.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
# Plugin deprecated
|
test = { inherit warnings; };
|
||||||
test.checkWarnings = false;
|
|
||||||
plugins.rust-tools = {
|
plugins.rust-tools = {
|
||||||
enable = true;
|
enable = true;
|
||||||
executor = "termopen";
|
executor = "termopen";
|
||||||
|
@ -77,8 +84,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
rust-analyzer-options = {
|
rust-analyzer-options = {
|
||||||
# Plugin deprecated
|
test = { inherit warnings; };
|
||||||
test.checkWarnings = false;
|
|
||||||
plugins.rust-tools = {
|
plugins.rust-tools = {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = {
|
server = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue