Skip to content

Commit

Permalink
Unicode::Collate may not be available
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@67480 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
kberry committed Jun 26, 2023
1 parent 28fed9a commit f190f64
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions texk/web2c/cwebdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2023-06-26 Karl Berry <karl@freefriends.org>

* ctwill-proofsort: Unicode::Collate is required but may not be
available.
* ctwill.test: exit 0 if Unicode::Collate is not available,
so we don't fail in environments without it.

2023-06-23 Andreas Scherer <https://ascherer.github.io>

* ctwill.test: Check CTWILL output.
Expand Down
8 changes: 7 additions & 1 deletion texk/web2c/cwebdir/ctwill-proofsort
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ use warnings;
use File::Basename;
use Getopt::Long qw(:config no_ignore_case bundling);
use Pod::Usage;
use Unicode::Collate;

BEGIN {
# Unicode::Collate has been around a long time,
# but it's not part of core Perl.
my $rc = eval { require Unicode::Collate; };
die "$0: the Unicode::Collate module is required\n" unless $rc;
}

# We expect a TeX file as the single command-line parameter.
my $progname = basename $0;
Expand Down
4 changes: 3 additions & 1 deletion texk/web2c/cwebdir/ctwill.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ diff ham.tex $testdir/ham.tex || exit 1
diff ham.sref $testdir/ham.sref || exit 1

# Test CTWILL-PROOFSORT
# Perl script not available in builddir
# Perl script not available in builddir, and requires Unicode::Collate;
# if that module is not available, just quit testing.
perl -e 'use Unicode::Collate;' 2>/dev/null || exit 0
$testdir/../ctwill-proofsort ham.tex > ham-sorted.tex || exit 1
diff ham-sorted.tex $testdir/ham-sorted.tex || exit 1

Expand Down

0 comments on commit f190f64

Please sign in to comment.