diff options
author | Silvan Mosberger <infinisil@icloud.com> | 2018-04-04 16:51:46 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2018-05-06 23:58:36 +0200 |
commit | b16a69289aae7a8aeb7d0410649764d9d2328e2f (patch) | |
tree | aea743319550a2ade7680df4725a8f97244cc7fd /lib/tests/modules.sh | |
parent | ef8996f15ea2dd5aace0f61f9ab03f3dfa3d4975 (diff) | |
download | nixlib-b16a69289aae7a8aeb7d0410649764d9d2328e2f.tar nixlib-b16a69289aae7a8aeb7d0410649764d9d2328e2f.tar.gz nixlib-b16a69289aae7a8aeb7d0410649764d9d2328e2f.tar.bz2 nixlib-b16a69289aae7a8aeb7d0410649764d9d2328e2f.tar.lz nixlib-b16a69289aae7a8aeb7d0410649764d9d2328e2f.tar.xz nixlib-b16a69289aae7a8aeb7d0410649764d9d2328e2f.tar.zst nixlib-b16a69289aae7a8aeb7d0410649764d9d2328e2f.zip |
lib/types: Add coercedTo unsound tests
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-x | lib/tests/modules.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 96a91c0fffbc..45fd2d624e1e 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -138,6 +138,11 @@ checkConfigOutput "\"42\"" config.value ./declare-coerced-value.nix checkConfigOutput "\"24\"" config.value ./declare-coerced-value.nix ./define-value-string.nix checkConfigError 'The option value .* in .* is not.*string or signed integer.*' config.value ./declare-coerced-value.nix ./define-value-list.nix +# Check coerced value with unsound coercion +checkConfigOutput "12" config.value ./declare-coerced-value-unsound.nix +checkConfigError 'The option value .* in .* is not.*8 bit signed integer.* or string.*' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nix +checkConfigError 'unrecognised JSON value' config.value ./declare-coerced-value-unsound.nix ./define-value-string-arbitrary.nix + cat <<EOF ====== module tests ====== $pass Pass |