Skip to content

Commit

Permalink
Silence regexp warning on older libxmxl versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed May 31, 2024
1 parent 2a64756 commit 486de5f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/00errors.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
use v6;
use Test;
use LibXML::XPath::Context;
use LibXML::Config;
plan 4;

# Silence warnings
LibXML::XPath::Context.SetGenericErrorFunc(-> |c { })
unless LibXML::Config.version >= v2.13.00;

{
use LibXML::Pattern;
my LibXML::Pattern $patt;
Expand All @@ -17,3 +23,4 @@ plan 4;
lives-ok {$regexp.new(:regexp('a'))};
throws-like { $regexp.new(:regexp('a[zz')) }, X::LibXML::OpFail, :message('XML RegExp Compile operation failed');
}

0 comments on commit 486de5f

Please sign in to comment.