Skip to content

Commit

Permalink
Use POD6 for information about this test instead of normal comments
Browse files Browse the repository at this point in the history
  • Loading branch information
samcv committed May 11, 2017
1 parent 54c9604 commit b4b72e8
Showing 1 changed file with 29 additions and 22 deletions.
51 changes: 29 additions & 22 deletions S15-nfg/GraphemeBreakTest.t
Expand Up @@ -3,32 +3,39 @@ my $location = "3rdparty/Unicode/9.0.0/ucd/auxiliary/GraphemeBreakTest.txt";
$location = "t/spec/$location".IO.e ?? "t/spec/$location" !! $location;
our $DEBUG;
use Test;
=begin pod
=NAME Unicode GraphemeBreakTest
# Unicode Data files in 3rdparty/Unicode/ and the snippet of commented code below
# are under SPDX-License-Identifier: Unicode-DFS-2016
# See 3rdparty/Unicode/LICENSE for full text of license.
# From GraphemeBreakTest.txt Unicode 9.0
=DESCRIPTION
Unicode Data files in 3rdparty/Unicode/ and the snippet of commented code below
are under SPDX-License-Identifier: Unicode-DFS-2016
See 3rdparty/Unicode/LICENSE for full text of license.
From GraphemeBreakTest.txt Unicode 9.0
# Default Grapheme Break Test
#
# Format:
# <string> (# <comment>)?
# <string> contains hex Unicode code points, with
# ÷ wherever there is a break opportunity, and
# × wherever there is not.
# <comment> the format can change, but currently it shows:
# - the sample character name
# - (x) the Grapheme_Cluster_Break property value for the sample character
# - [x] the rule that determines whether there is a break or not
# Default Grapheme Break Test
#
# Format:
# <string> (# <comment>)?
# <string> contains hex Unicode code points, with
# ÷ wherever there is a break opportunity, and
# × wherever there is not.
# <comment> the format can change, but currently it shows:
# - the sample character name
# - (x) the Grapheme_Cluster_Break property value for the sample character
# - [x] the rule that determines whether there is a break or not
## XXX HOW TO FUDGE XXX
# The keys of the hash below are line numbers of the unicode test document.
# values are either set to ALL or set to one or more of C,0,1,2,3,4..
# Example:
=head1 HOW TO FUDGE
=para The keys of the hash below are line numbers of the unicode test document.
values are either set to ALL or set to one or more of C,0,1,2,3,4..
# not ok 2384 - Line 835: grapheme [1] has correct codepoints
=para B<Example>:
=item3 C<not ok 2384 - Line 835: grapheme [1] has correct codepoints>
=para You can add 835 => ['1'] to the hash and it will fudge that line for you
=end pod

# You can add 835 => ['1'] to the hash and it will fudge that line for you
constant %fudged-tests = {
224 => ['ALL'],
442 => [0],
Expand Down Expand Up @@ -131,4 +138,4 @@ sub process-line (Str:D $line, @fail, :@only!) {
}
is-deeply $list<string>.substr($elem, 1).ords.flat, $list<ord-array>[$elem].flat, "Line $line-no: grapheme [$elem] has correct codepoints" or @fail.push($line-no);
}
}
}

0 comments on commit b4b72e8

Please sign in to comment.