1. Toby Inkster
  2. p5-type-tiny

Commits

Toby Inkster  committed e2fabdf

Types::Common::{String,Numeric}

  • Participants
  • Parent commits 6ed1a6d
  • Branches default

Comments (0)

Files changed (7)

File lib/Types/Common/Numeric.pm

View file
+package Types::Common::Numeric;
+
+use 5.006001;
+use strict;
+use warnings;
+
+BEGIN {
+	if ($] < 5.008) { require Devel::TypeTiny::Perl56Compat };
+}
+
+BEGIN {
+	$Type::Params::AUTHORITY = 'cpan:TOBYINK';
+	$Type::Params::VERSION   = '0.032';
+}
+
+use Type::Library -base, -declare => qw(
+	PositiveNum PositiveOrZeroNum
+	PositiveInt PositiveOrZeroInt
+	NegativeNum NegativeOrZeroNum
+	NegativeInt NegativeOrZeroInt
+	SingleDigit
+);
+
+use Types::Standard qw( Num Int );
+
+my $meta = __PACKAGE__->meta;
+
+$meta->add_type(
+	name       => 'PositiveNum',
+	parent     => Num,
+	constraint => sub { $_ > 0 },
+	inlined    => sub { undef, qq($_ > 0) },
+	message    => sub { "Must be a positive number" },
+);
+
+$meta->add_type(
+	name       => 'PositiveOrZeroNum',
+	parent     => Num,
+	constraint => sub { $_ >= 0 },
+	inlined    => sub { undef, qq($_ >= 0) },
+	message    => sub { "Must be a number greater than or equal to zero" },
+);
+
+$meta->add_type(
+	name       => 'PositiveInt',
+	parent     => Int,
+	constraint => sub { $_ > 0 },
+	inlined    => sub { undef, qq($_ > 0) },
+	message    => sub { "Must be a positive integer" },
+);
+
+$meta->add_type(
+	name       => 'PositiveOrZeroInt',
+	parent     => Int,
+	constraint => sub { $_ >= 0 },
+	inlined    => sub { undef, qq($_ >= 0) },
+	message    => sub { "Must be an integer greater than or equal to zero" },
+);
+
+$meta->add_type(
+	name       => 'NegativeNum',
+	parent     => Num,
+	constraint => sub { $_ < 0 },
+	inlined    => sub { undef, qq($_ < 0) },
+	message    => sub { "Must be a negative number" },
+);
+
+$meta->add_type(
+	name       => 'NegativeOrZeroNum',
+	parent     => Num,
+	constraint => sub { $_ <= 0 },
+	inlined    => sub { undef, qq($_ <= 0) },
+	message    => sub { "Must be a number less than or equal to zero" },
+);
+
+$meta->add_type(
+	name       => 'NegativeInt',
+	parent     => Int,
+	constraint => sub { $_ < 0 },
+	inlined    => sub { undef, qq($_ < 0) },
+	message    => sub { "Must be a negative integer" },
+);
+
+$meta->add_type(
+	name       => 'NegativeOrZeroInt',
+	parent     => Int,
+	constraint => sub { $_ >= 0 },
+	inlined    => sub { undef, qq($_ <= 0) },
+	message    => sub { "Must be an integer less than or equal to zero" },
+);
+
+$meta->add_type(
+	name       => 'SingleDigit',
+	parent     => Int,
+	constraint => sub { $_ >= -9 and $_ <= 9 },
+	inlined    => sub { undef, qq($_ >= -9), qq($_ <= 9) },
+	message    => sub { "Must be a single digit" },
+);
+ 
+1;
+
+__END__
+
+=pod
+
+=encoding utf-8
+
+=head1 NAME
+
+Types::Common::Numeric - drop-in replacement for MooseX::Types::Common::Numeric
+
+=head1 DESCRIPTION
+
+A drop-in replacement for L<MooseX::Types::Common::Numeric>.
+
+=head2 Types
+
+The following types are similar to those described in
+L<MooseX::Types::Common::Numeric>.
+
+=over
+
+=item C<PositiveNum>
+
+=item C<PositiveOrZeroNum>
+
+=item C<PositiveInt>
+
+=item C<PositiveOrZeroInt>
+
+=item C<NegativeNum>
+
+=item C<NegativeOrZeroNum>
+
+=item C<NegativeInt>
+
+=item C<NegativeOrZeroInt>
+
+=item C<SingleDigit>
+
+=back
+
+C<SingleDigit> interestingly accepts the numbers -9 to -1; not
+just 0 to 9. 
+
+=head1 BUGS
+
+Please report any bugs to
+L<http://rt.cpan.org/Dist/Display.html?Queue=Type-Tiny>.
+
+=head1 SEE ALSO
+
+L<Types::Standard>, L<Types::Common::String>.
+
+L<MooseX::Types::Common>,
+L<MooseX::Types::Common::Numeric>,
+L<MooseX::Types::Common::String>.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2013 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+

File lib/Types/Common/String.pm

View file
+package Types::Common::String;
+
+use 5.006001;
+use strict;
+use warnings;
+use utf8;
+
+BEGIN {
+	if ($] < 5.008) { require Devel::TypeTiny::Perl56Compat };
+}
+
+BEGIN {
+	$Type::Params::AUTHORITY = 'cpan:TOBYINK';
+	$Type::Params::VERSION   = '0.032';
+}
+
+use Type::Library -base, -declare => qw(
+	SimpleStr
+	NonEmptySimpleStr
+	NumericCode
+	LowerCaseSimpleStr
+	UpperCaseSimpleStr
+	Password
+	StrongPassword
+	NonEmptyStr
+	LowerCaseStr
+	UpperCaseStr
+);
+
+use Types::Standard qw( Str );
+
+my $meta = __PACKAGE__->meta;
+
+$meta->add_type(
+	name       => SimpleStr,
+	parent     => Str,
+	constraint => sub { length($_) <= 255 and not /\n/ },
+	inlined    => sub { undef, qq(length($_) <= 255), qq($_ !~ /\\n/) },
+	message    => sub { "Must be a single line of no more than 255 chars" },
+);
+
+$meta->add_type(
+	name       => NonEmptySimpleStr,
+	parent     => SimpleStr,
+	constraint => sub { length($_) > 0 },
+	inlined    => sub { undef, qq(length($_) > 0) },
+	message    => sub { "Must be a non-empty single line of no more than 255 chars" },
+);
+
+$meta->add_type(
+	name       => NumericCode,
+	parent     => NonEmptySimpleStr,
+	constraint => sub { /^[0-9]+$/ },
+	inlined    => sub { SimpleStr->inline_check($_), qq($_ =~ m/^[0-9]+\$/) },
+	message    => sub {
+		'Must be a non-empty single line of no more than 255 chars that consists '
+			. 'of numeric characters only'
+	},
+);
+
+NumericCode->coercion->add_type_coercions(
+	NonEmptySimpleStr, q[ do { (my $code = $_) =~ s/[[:punct:]]//g; $code } ],
+);
+
+$meta->add_type(
+	name       => Password,
+	parent     => NonEmptySimpleStr,
+	constraint => sub { length($_) > 3 },
+	inlined    => sub { SimpleStr->inline_check($_), qq(length($_) > 3) },
+	message    => sub { "Must be between 4 and 255 chars" },
+);
+
+$meta->add_type(
+	name       => StrongPassword,
+	parent     => Password,
+	constraint => sub { length($_) > 7 and /[^a-zA-Z]/ },
+	inlined    => sub { SimpleStr()->inline_check($_), qq(length($_) > 7), qq($_ =~ /[^a-zA-Z]/) },
+	message    => sub { "Must be between 8 and 255 chars, and contain a non-alpha char" },
+);
+
+$meta->add_type(
+	name       => NonEmptyStr,
+	parent     => Str,
+	constraint => sub { length($_) > 0 },
+	inlined    => sub { undef, qq(length($_) > 0) },
+	message    => sub { "Must not be empty" },
+);
+
+$meta->add_type(
+	name       => LowerCaseStr,
+	parent     => NonEmptyStr,
+	constraint => sub { !/\p{Upper}/ms },
+	inlined    => sub { undef, qq($_ !~ /\\p{Upper}/ms) },
+	message    => sub { "Must not contain upper case letters" },
+);
+
+LowerCaseStr->coercion->add_type_coercions(
+	NonEmptyStr, q[ lc($_) ],
+);
+
+$meta->add_type(
+	name       => UpperCaseStr,
+	parent     => NonEmptyStr,
+	constraint => sub { !/\p{Lower}/ms },
+	inlined    => sub { undef, qq($_ !~ /\\p{Lower}/ms) },
+	message    => sub { "Must not contain lower case letters" },
+);
+
+UpperCaseStr->coercion->add_type_coercions(
+	NonEmptyStr, q[ uc($_) ],
+);
+
+$meta->add_type(
+	name       => LowerCaseSimpleStr,
+	parent     => NonEmptySimpleStr,
+	constraint => sub { !/\p{Upper}/ms },
+	inlined    => sub { undef, qq($_ !~ /\\p{Upper}/ms) },
+	message    => sub { "Must not contain pper case letters" },
+);
+
+LowerCaseSimpleStr->coercion->add_type_coercions(
+	NonEmptySimpleStr, q[ lc($_) ],
+);
+
+$meta->add_type(
+	name       => UpperCaseSimpleStr,
+	parent     => NonEmptySimpleStr,
+	constraint => sub { !/\p{Lower}/ms },
+	inlined    => sub { undef, qq($_ !~ /\\p{Lower}/ms) },
+	message    => sub { "Must not contain lower case letters" },
+);
+
+UpperCaseSimpleStr->coercion->add_type_coercions(
+	NonEmptySimpleStr, q[ uc($_) ],
+);
+
+1;
+
+__END__
+
+=pod
+
+=encoding utf-8
+
+=head1 NAME
+
+Types::Common::String - drop-in replacement for MooseX::Types::Common::String
+
+=head1 DESCRIPTION
+
+A drop-in replacement for L<MooseX::Types::Common::String>.
+
+=head2 Types
+
+The following types are similar to those described in
+L<MooseX::Types::Common::String>.
+
+=over
+
+=item C<SimpleStr>
+
+=item C<NonEmptySimpleStr>
+
+=item C<NumericCode>
+
+=item C<LowerCaseSimpleStr>
+
+=item C<UpperCaseSimpleStr>
+
+=item C<Password>
+
+=item C<StrongPassword>
+
+=item C<NonEmptyStr>
+
+=item C<LowerCaseStr>
+
+=item C<UpperCaseStr>
+
+=back
+
+=head1 BUGS
+
+Please report any bugs to
+L<http://rt.cpan.org/Dist/Display.html?Queue=Type-Tiny>.
+
+=head1 SEE ALSO
+
+L<Types::Standard>, L<Types::Common::Numeric>.
+
+L<MooseX::Types::Common>,
+L<MooseX::Types::Common::Numeric>,
+L<MooseX::Types::Common::String>.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2013 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+

File lib/Types/Standard.pm

View file
 L<Types::Encodings> provides C<Bytes> and C<Chars> type constraints that
 were formerly found in Types::Standard.
 
+L<Types::Common::Numeric> and L<Types::Common::String> provide replacements
+for L<MooseX::Types::Common>.
+
 =head1 AUTHOR
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.

File t/common-coerce.t

View file
+=pod
+
+=encoding utf-8
+
+=head1 PURPOSE
+
+Tests coercions for L<Types::Common::String>.
+
+These tests are based on tests from L<MooseX::Types::Common>.
+
+=head1 AUTHORS
+
+=over 4
+ 
+=item *
+ 
+Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>)
+ 
+=item *
+ 
+K. James Cheetham <jamie@shadowcatsystems.co.uk>
+ 
+=item *
+ 
+Guillermo Roditi <groditi@gmail.com>
+ 
+=back
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2013 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>).
+ 
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
+use strict;
+use warnings FATAL => 'all';
+use Test::More;
+
+use Types::Common::String qw(
+	+LowerCaseSimpleStr
+	+UpperCaseSimpleStr
+	+LowerCaseStr
+	+UpperCaseStr
+	+NumericCode
+);
+
+is(to_UpperCaseSimpleStr('foo'), 'FOO', 'uppercase str' );
+is(to_LowerCaseSimpleStr('BAR'), 'bar', 'lowercase str' );
+
+is(to_UpperCaseStr('foo'), 'FOO', 'uppercase str' );
+is(to_LowerCaseStr('BAR'), 'bar', 'lowercase str' );
+
+is(to_NumericCode('4111-1111-1111-1111'), '4111111111111111', 'numeric code' );
+
+done_testing;

File t/common-numeric.t

View file
+=pod
+
+=encoding utf-8
+
+=head1 PURPOSE
+
+Tests constraints for L<Types::Common::Numeric>.
+
+These tests are based on tests from L<MooseX::Types::Common>.
+
+=head1 AUTHORS
+
+=over 4
+ 
+=item *
+ 
+Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>)
+ 
+=item *
+ 
+K. James Cheetham <jamie@shadowcatsystems.co.uk>
+ 
+=item *
+ 
+Guillermo Roditi <groditi@gmail.com>
+ 
+=back
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2013 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>).
+ 
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
+use strict;
+use warnings FATAL => 'all';
+use Test::More;
+
+use Types::Common::Numeric qw(
+	+PositiveNum +PositiveOrZeroNum
+	+PositiveInt +PositiveOrZeroInt
+	+NegativeNum +NegativeOrZeroNum
+	+NegativeInt +NegativeOrZeroInt
+	+SingleDigit
+);
+
+ok(!is_SingleDigit(100), 'SingleDigit 100');
+ok(!is_SingleDigit(10), 'SingleDigit 10');
+ok(is_SingleDigit(9), 'SingleDigit 9');
+ok(is_SingleDigit(1), 'SingleDigit 1');
+ok(is_SingleDigit(0), 'SingleDigit 0');
+ok(is_SingleDigit(-1), 'SingleDigit -1');
+ok(is_SingleDigit(-9), 'SingleDigit -9');
+ok(!is_SingleDigit(-10), 'SingleDigit -10');
+
+
+ok(!is_PositiveInt(-100), 'PositiveInt (-100)');
+ok(!is_PositiveInt(0), 'PositiveInt (0)');
+ok(!is_PositiveInt(100.885), 'PositiveInt (100.885)');
+ok(is_PositiveInt(100), 'PositiveInt (100)');
+ok(!is_PositiveNum(0), 'PositiveNum (0)');
+ok(is_PositiveNum(100.885), 'PositiveNum (100.885)');
+ok(!is_PositiveNum(-100.885), 'PositiveNum (-100.885)');
+ok(is_PositiveNum(0.0000000001), 'PositiveNum (0.0000000001)');
+
+ok(!is_PositiveOrZeroInt(-100), 'PositiveOrZeroInt (-100)');
+ok(is_PositiveOrZeroInt(0), 'PositiveOrZeroInt (0)');
+ok(!is_PositiveOrZeroInt(100.885), 'PositiveOrZeroInt (100.885)');
+ok(is_PositiveOrZeroInt(100), 'PositiveOrZeroInt (100)');
+ok(is_PositiveOrZeroNum(0), 'PositiveOrZeroNum (0)');
+ok(is_PositiveOrZeroNum(100.885), 'PositiveOrZeroNum (100.885)');
+ok(!is_PositiveOrZeroNum(-100.885), 'PositiveOrZeroNum (-100.885)');
+ok(is_PositiveOrZeroNum(0.0000000001), 'PositiveOrZeroNum (0.0000000001)');
+
+ok(!is_NegativeInt(100), 'NegativeInt (100)');
+ok(!is_NegativeInt(-100.885), 'NegativeInt (-100.885)');
+ok(is_NegativeInt(-100), 'NegativeInt (-100)');
+ok(!is_NegativeInt(0), 'NegativeInt (0)');
+ok(is_NegativeNum(-100.885), 'NegativeNum (-100.885)');
+ok(!is_NegativeNum(100.885), 'NegativeNum (100.885)');
+ok(!is_NegativeNum(0), 'NegativeNum (0)');
+ok(is_NegativeNum(-0.0000000001), 'NegativeNum (-0.0000000001)');
+
+ok(!is_NegativeOrZeroInt(100), 'NegativeOrZeroInt (100)');
+ok(!is_NegativeOrZeroInt(-100.885), 'NegativeOrZeroInt (-100.885)');
+ok(is_NegativeOrZeroInt(-100), 'NegativeOrZeroInt (-100)');
+ok(is_NegativeOrZeroInt(0), 'NegativeOrZeroInt (0)');
+ok(is_NegativeOrZeroNum(-100.885), 'NegativeOrZeroNum (-100.885)');
+ok(!is_NegativeOrZeroNum(100.885), 'NegativeOrZeroNum (100.885)');
+ok(is_NegativeOrZeroNum(0), 'NegativeOrZeroNum (0)');
+ok(is_NegativeOrZeroNum(-0.0000000001), 'NegativeOrZeroNum (-0.0000000001)');
+
+done_testing;

File t/common-string.t

View file
+=pod
+
+=encoding utf-8
+
+=head1 PURPOSE
+
+Tests constraints for L<Types::Common::String>.
+
+These tests are based on tests from L<MooseX::Types::Common>.
+
+=head1 AUTHORS
+
+=over 4
+ 
+=item *
+ 
+Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>)
+ 
+=item *
+ 
+K. James Cheetham <jamie@shadowcatsystems.co.uk>
+ 
+=item *
+ 
+Guillermo Roditi <groditi@gmail.com>
+ 
+=back
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2013 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>).
+ 
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
+use strict;
+use warnings FATAL => 'all';
+use Test::More;
+
+use Types::Common::String qw(
+	+SimpleStr
+	+NonEmptySimpleStr
+	+LowerCaseSimpleStr
+	+UpperCaseSimpleStr
+	+Password
+	+StrongPassword
+	+NonEmptyStr
+	+LowerCaseStr
+	+UpperCaseStr
+	+NumericCode
+);
+
+# TODO: need to check both the inlined and non-inlined versions!
+
+ok(is_SimpleStr(''), 'SimpleStr');
+ok(is_SimpleStr('a string'), 'SimpleStr 2');
+ok(!is_SimpleStr("another\nstring"), 'SimpleStr 3');
+ok(!is_SimpleStr(join('', ("long string" x 25))), 'SimpleStr 4');
+
+ok(!is_NonEmptyStr(''), 'NonEmptyStr');
+ok(is_NonEmptyStr('a string'), 'NonEmptyStr 2');
+ok(is_NonEmptyStr("another string"), 'NonEmptyStr 3');
+ok(is_NonEmptyStr(join('', ("long string" x 25))), 'NonEmptyStr 4');
+
+ok(is_NonEmptySimpleStr('good str'), 'NonEmptySimplrStr');
+ok(!is_NonEmptySimpleStr(''), 'NonEmptyStr 2');
+
+ok(!is_Password('no'), 'Password');
+ok(is_Password('okay'), 'Password 2');
+
+ok(!is_StrongPassword('notokay'), 'StrongPassword');
+ok(is_StrongPassword('83773r_ch01c3'), 'StrongPassword 2');
+
+ok(!is_LowerCaseSimpleStr('NOTOK'), 'LowerCaseSimpleStr');
+ok(is_LowerCaseSimpleStr('ok'), 'LowerCaseSimpleStr 2');
+ok(!is_LowerCaseSimpleStr('NOTOK_123`"'), 'LowerCaseSimpleStr 3');
+ok(is_LowerCaseSimpleStr('ok_123`"'), 'LowerCaseSimpleStr 4');
+
+ok(!is_UpperCaseSimpleStr('notok'), 'UpperCaseSimpleStr');
+ok(is_UpperCaseSimpleStr('OK'), 'UpperCaseSimpleStr 2');
+ok(!is_UpperCaseSimpleStr('notok_123`"'), 'UpperCaseSimpleStr 3');
+ok(is_UpperCaseSimpleStr('OK_123`"'), 'UpperCaseSimpleStr 4');
+
+ok(!is_LowerCaseStr('NOTOK'), 'LowerCaseStr');
+ok(is_LowerCaseStr("ok\nok"), 'LowerCaseStr 2');
+ok(!is_LowerCaseStr('NOTOK_123`"'), 'LowerCaseStr 3');
+ok(is_LowerCaseStr("ok\n_123`'"), 'LowerCaseStr 4');
+
+ok(!is_UpperCaseStr('notok'), 'UpperCaseStr');
+ok(is_UpperCaseStr("OK\nOK"), 'UpperCaseStr 2');
+ok(!is_UpperCaseStr('notok_123`"'), 'UpperCaseStr 3');
+ok(is_UpperCaseStr("OK\n_123`'"), 'UpperCaseStr 4');
+
+ok(is_NumericCode('032'),  'NumericCode lives');
+ok(!is_NumericCode('abc'),  'NumericCode dies' );
+ok(!is_NumericCode('x18'),  'mixed NumericCode dies');
+
+done_testing;

File t/common-unicode.t

View file
+=pod
+
+=encoding utf-8
+
+=head1 PURPOSE
+
+Tests Unicode support for L<Types::Common::String>.
+
+These tests are based on tests from L<MooseX::Types::Common>.
+
+=head1 AUTHORS
+
+=over 4
+ 
+=item *
+ 
+Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>)
+ 
+=item *
+ 
+K. James Cheetham <jamie@shadowcatsystems.co.uk>
+ 
+=item *
+ 
+Guillermo Roditi <groditi@gmail.com>
+ 
+=back
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2013 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>).
+ 
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
+use strict;
+use warnings FATAL => 'all';
+use utf8;
+use Test::More;
+
+use Types::Common::String -all;
+
+ok(  is_UpperCaseStr('CAFÉ'), q[CAFÉ is uppercase] );
+ok( !is_UpperCaseStr('CAFé'), q[CAFé is not (entirely) uppercase] );
+
+ok( !is_UpperCaseStr('ŐħĤăĩ'), q[----- not entirely uppercase] );
+ok( !is_LowerCaseStr('ŐħĤăĩ'), q[----- not entirely lowercase] );
+
+ok(  is_LowerCaseStr('café'), q[café is lowercase] );
+ok( !is_LowerCaseStr('cafÉ'), q[cafÉ is not (entirely) lowercase] );
+
+ok(  is_UpperCaseSimpleStr('CAFÉ'), q[CAFÉ is uppercase] );
+ok( !is_UpperCaseSimpleStr('CAFé'), q[CAFé is not (entirely) uppercase] );
+
+ok(  is_LowerCaseSimpleStr('café'), q[café is lowercase] );
+ok( !is_LowerCaseSimpleStr('cafÉ'), q[cafÉ is not (entirely) lowercase] );
+
+done_testing;