diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-03-26 21:19:14 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-06-02 08:29:13 -0600 |
commit | 35dfc9cf57914064447d60f8245098db9a20067e (patch) | |
tree | 3f742f3f3aa6d099d29884947076e65fd05a435c /lib | |
parent | 4731737c3a4f708d89660b01f56570d0699f2093 (diff) | |
download | perl-35dfc9cf57914064447d60f8245098db9a20067e.tar.gz |
charnames.t: Skip testing named sequences if don't exist
Instead of dying when applied to a Unicode version that doesn't have
named sequences, skip them.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/charnames.t | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/charnames.t b/lib/charnames.t index 8aba9be9e0..b5233de860 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -1185,8 +1185,7 @@ is("\N{U+1D0C5}", "\N{BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS}", 'V $block = $end_block + 1; } - open $fh, "<", "../../lib/unicore/NamedSequences.txt" or - die "Can't open ../../lib/unicore/NamedSequences.txt: $!"; + if (open my $fh, "<", "../../lib/unicore/NamedSequences.txt") { while (<$fh>) { chomp; s/^\s*#.*//; @@ -1200,6 +1199,12 @@ is("\N{U+1D0C5}", "\N{BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS}", 'V #diag("$name, $utf8"); } close $fh; + } + else { + use Unicode::UCD; + die "Can't open ../../lib/unicore/NamedSequences.txt: $!" + if pack("C*", split /\./, Unicode::UCD::UnicodeVersion()) ge v4.1.0; + } unless ($all_pass) { |