summaryrefslogtreecommitdiff
path: root/t/release-pp-31-incorrect-spelling.t
diff options
context:
space:
mode:
Diffstat (limited to 't/release-pp-31-incorrect-spelling.t')
-rw-r--r--t/release-pp-31-incorrect-spelling.t73
1 files changed, 73 insertions, 0 deletions
diff --git a/t/release-pp-31-incorrect-spelling.t b/t/release-pp-31-incorrect-spelling.t
new file mode 100644
index 0000000..98f32c2
--- /dev/null
+++ b/t/release-pp-31-incorrect-spelling.t
@@ -0,0 +1,73 @@
+#!/usr/bin/perl -w
+
+use Test::More;
+
+BEGIN {
+ unless ( $ENV{RELEASE_TESTING} ) {
+ plan skip_all => 'these tests are for release testing';
+ }
+
+ $ENV{PV_TEST_PERL} = 1;
+}
+
+
+use strict;
+use warnings;
+
+use Test::More;
+
+use Params::Validate qw( validate validate_pos SCALAR );
+
+plan skip_all => 'Spec validation is disabled for now';
+
+{
+ my @p = ( foo => 1, bar => 2 );
+
+ eval {
+ validate(
+ @p, {
+ foo => {
+ type => SCALAR,
+ callbucks => {
+ 'one' => sub {1}
+ },
+ },
+ bar => { type => SCALAR },
+ }
+ );
+ };
+
+ like( $@, qr/is not an allowed validation spec key/ );
+
+ eval {
+ validate(
+ @p, {
+ foo => {
+ hype => SCALAR,
+ callbacks => {
+ 'one' => sub {1}
+ },
+ },
+ bar => { type => SCALAR },
+ }
+ );
+ };
+
+ like( $@, qr/is not an allowed validation spec key/ );
+ eval {
+ validate(
+ @p, {
+ foo => {
+ type => SCALAR,
+ regexp => qr/^\d+$/,
+ },
+ bar => { type => SCALAR },
+ }
+ );
+ };
+
+ like( $@, qr/is not an allowed validation spec key/ );
+}
+
+done_testing();
+