about summary refs log tree commit diff
path: root/lib/tests/modules.sh
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-11-03 13:11:04 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-11-03 13:12:58 +0100
commit1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb (patch)
tree6dba8e2048eba07f40991183de1493d229f22924 /lib/tests/modules.sh
parentad10d4fdef46a00bbe2d95aadc96b9e062fe0539 (diff)
downloadnixlib-1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb.tar
nixlib-1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb.tar.gz
nixlib-1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb.tar.bz2
nixlib-1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb.tar.lz
nixlib-1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb.tar.xz
nixlib-1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb.tar.zst
nixlib-1b6e5ac9520ebcfc283cd18c10856cdcd94c91eb.zip
lib/tests/modules: Test doRename
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-xlib/tests/modules.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index c9ea674ee104..6d2eb24db55c 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -348,6 +348,13 @@ checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survive
 # because of an `extendModules` bug, issue 168767.
 checkConfigOutput '^1$' config.sub.specialisation.value ./extendModules-168767-imports.nix
 
+# doRename works when `warnings` does not exist.
+checkConfigOutput '^1234$' config.c.d.e ./doRename-basic.nix
+# doRename adds a warning.
+checkConfigOutput '^"The option `a\.b. defined in `.*/doRename-warnings\.nix. has been renamed to `c\.d\.e.\."$' \
+  config.result \
+  ./doRename-warnings.nix
+
 cat <<EOF
 ====== module tests ======
 $pass Pass