summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/interop.t2
-rw-r--r--t/validate.t2
2 files changed, 2 insertions, 2 deletions
diff --git a/t/interop.t b/t/interop.t
index acb3fb0..bd7c7c9 100644
--- a/t/interop.t
+++ b/t/interop.t
@@ -81,7 +81,7 @@ subtest 'JSON::XS coercion', sub {
};
subtest 'Cpanel::JSON::XS coercion', sub {
- eval { require Cpanel::JSON::XS; 1 } or plan skip_all => 'Cpanel::JSON::XS not installed';
+ eval { require Cpanel::JSON::XS; require Cpanel::JSON::XS::Type; 1 } or return plan skip_all => 'Cpanel::JSON::XS not installed or too old';
my @extra = (
[ { type => 'num' }, '10', '10.0' ],
);
diff --git a/t/validate.t b/t/validate.t
index 82f979d..dbb1582 100644
--- a/t/validate.t
+++ b/t/validate.t
@@ -140,7 +140,7 @@ t { ascii => 1 }, "a\nb", "a\nb", { validation => 'ascii', got => "a\nb" };
# custom validations
t { hex => 1 }, 'DeadBeef', 'DeadBeef', undef;
-t { hex => 1 }, 'x', 'x', { validation => 'hex', error => { validation => 'regex', regex => '(?^i:^[0-9a-f]*$)', got => 'x' } };
+t { hex => 1 }, 'x', 'x', { validation => 'hex', error => { validation => 'regex', regex => "$validations{hex}{regex}", got => 'x' } };
t { prefix => 'a' }, 'abc', 'abc', undef;
t { prefix => 'a' }, 'cba', 'cba', { validation => 'prefix', error => { validation => 'func', result => '' } };
t { bool => 1 }, 'abc', 1, undef;