Skip to content

Commit

Permalink
lib/charnames.t uses function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
atoomic committed Jul 1, 2020
1 parent 3f057f1 commit 900acb2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/charnames.t
Expand Up @@ -92,10 +92,10 @@ sub to_bytes {
unpack"U0a*", shift;
}

sub get_loose_name ($) { # Modify name to stress the loose tests.
sub get_loose_name ($lname) { # Modify name to stress the loose tests.

# First, all lower case,
my $loose_name = lc shift;
my $loose_name = lc $lname;

# Then squeeze out all the blanks not adjacent to hyphens, but make the
# spaces that are adjacent to hypens into two, to make sure the code isn't
Expand All @@ -113,17 +113,15 @@ sub get_loose_name ($) { # Modify name to stress the loose tests.
return $loose_name
}

sub test_vianame ($$$) {
# $i is the code point in decimal; $hex in hexadecimal; $name is
# character name to test
sub test_vianame ($i, $hex, $name) {
CORE::state $wildcard_count = 0;

# Run the vianame tests on a code point, both loose and full

my $all_pass = 1;

# $i is the code point in decimal; $hex in hexadecimal; $name is
# character name to test
my ($i, $hex, $name) = @_;

# Get a copy of the name modified to stress the loose tests.
my $loose_name = get_loose_name($name);

Expand Down

0 comments on commit 900acb2

Please sign in to comment.