Commit | Line | Data |
---|---|---|
c49d5ed7 JS |
1 | BEGIN { |
2 | chdir 't' if -d 't'; | |
f2b25aae | 3 | require './test.pl'; |
43ece5b1 | 4 | set_up_inc('../lib'); |
394d2d3f | 5 | skip_all("utf8_heavy no longer used much"); |
2b08d1e2 | 6 | skip_all_without_unicode_tables(); |
c49d5ed7 JS |
7 | } |
8 | ||
9 | plan tests => 1; | |
10 | ||
48791bf1 | 11 | # Looks to see if a "do 'unicore/lib/Scx/Hira.pl'" is called more than once, by |
5c25e937 | 12 | # putting a compile sub first on the library path; |
90412e3e KW |
13 | # XXX Kludge: requires exact path, which might change, and has deep knowledge |
14 | # of how utf8_heavy.pl works, which might also change. | |
15 | ||
16 | BEGIN { # Make sure catches compile time references | |
17 | $::count = 0; | |
18 | unshift @INC, sub { | |
48791bf1 | 19 | $::count++ if $_[1] eq 'unicore/lib/Scx/Hira.pl'; |
90412e3e KW |
20 | }; |
21 | } | |
c49d5ed7 JS |
22 | |
23 | my $s = 'foo'; | |
24 | ||
88d45d28 KW |
25 | # The second value is to prevent an optimization that exists at the time this |
26 | # is written to re-use a property without trying to look it up if it is the | |
27 | # only thing in a character class. They differ in order to make sure that any | |
28 | # future optimizations that don't re-use identical character classes don't come | |
29 | # into play | |
30 | $s =~ m/[\p{Hiragana}\x{101}]/; | |
31 | $s =~ m/[\p{Hiragana}\x{102}]/; | |
32 | $s =~ m/[\p{Hiragana}\x{103}]/; | |
33 | $s =~ m/[\p{Hiragana}\x{104}]/; | |
c49d5ed7 | 34 | |
90412e3e | 35 | is($::count, 1, "Swatch hash caching kept us from reloading swatch hash."); |