lib/types: add ints.positive.

For values that are positive, but cannot be 0.
This commit is contained in:
Profpatsch 2017-10-31 17:30:15 +01:00
parent 1158910676
commit 462c048c77
5 changed files with 25 additions and 0 deletions

View file

@ -65,6 +65,8 @@ checkConfigError 'The option .* defined in .* does not exist.' config.enable ./d
# unsigned
checkConfigOutput "42" config.value ./declare-int-unsigned-value.nix ./define-value-int-positive.nix
checkConfigError 'The option value .* in .* is not of type.*unsigned integer.*' config.value ./declare-int-unsigned-value.nix ./define-value-int-negative.nix
# positive
checkConfigError 'The option value .* in .* is not of type.*positive integer.*' config.value ./declare-int-positive-value.nix ./define-value-int-zero.nix
# between
checkConfigOutput "42" config.value ./declare-int-between-value.nix ./define-value-int-positive.nix
checkConfigError 'The option value .* in .* is not of type.*between.*-21 and 43.*inclusive.*' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix