diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-05-18 18:42:18 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-06-14 23:01:26 +0200 |
commit | 38b7709a6f02ea33fe67220b7ff14fb21ab08e14 (patch) | |
tree | 4f9eba7fcf513b4757ee2cfb4d216a40470c96c5 /lib/tests/modules | |
parent | 4746f6d03e4f8dc6e7399f45aaba0ca3aac32761 (diff) | |
download | nixlib-38b7709a6f02ea33fe67220b7ff14fb21ab08e14.tar nixlib-38b7709a6f02ea33fe67220b7ff14fb21ab08e14.tar.gz nixlib-38b7709a6f02ea33fe67220b7ff14fb21ab08e14.tar.bz2 nixlib-38b7709a6f02ea33fe67220b7ff14fb21ab08e14.tar.lz nixlib-38b7709a6f02ea33fe67220b7ff14fb21ab08e14.tar.xz nixlib-38b7709a6f02ea33fe67220b7ff14fb21ab08e14.tar.zst nixlib-38b7709a6f02ea33fe67220b7ff14fb21ab08e14.zip |
lib/test/modules.sh: Test deferredModule error location file
Diffstat (limited to 'lib/tests/modules')
-rw-r--r-- | lib/tests/modules/deferred-module.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tests/modules/deferred-module.nix b/lib/tests/modules/deferred-module.nix index faf459a991fa..dc8072d4e6c3 100644 --- a/lib/tests/modules/deferred-module.nix +++ b/lib/tests/modules/deferred-module.nix @@ -1,7 +1,7 @@ { lib, ... }: let inherit (lib) types mkOption setDefaultModuleLocation; - inherit (types) deferredModule lazyAttrsOf submodule str raw; + inherit (types) deferredModule lazyAttrsOf submodule str raw enum; in { imports = [ @@ -28,6 +28,7 @@ in _file = "default-1.nix"; default = { config, ... }: { options.settingsDict = lib.mkOption { type = lazyAttrsOf str; default = {}; }; + options.bottom = lib.mkOption { type = enum []; }; }; } @@ -44,6 +45,11 @@ in } { + _file = "the-file-that-contains-the-bad-config.nix"; + default.bottom = "bogus"; + } + + { _file = "nodes-foo-c-is-a.nix"; nodes.foo = { config, ... }: { settingsDict.c = config.settingsDict.a; |