Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/lib/Locale/Codes/t/constants.t

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!./perl
#
# constants.t - tests for Locale::Constants
#

BEGIN {
        chdir 't' if -d 't';
        @INC = '../lib';
}

use Locale::Constants;

print "1..3\n";

if (defined LOCALE_CODE_ALPHA_2
    && defined LOCALE_CODE_ALPHA_3
    && defined LOCALE_CODE_NUMERIC)
{
    print "ok 1\n";
}
else
{
    print "not ok 1\n";
}

if (LOCALE_CODE_ALPHA_2 != LOCALE_CODE_ALPHA_3
    && LOCALE_CODE_ALPHA_2 != LOCALE_CODE_NUMERIC
    && LOCALE_CODE_ALPHA_3 != LOCALE_CODE_NUMERIC)
{
    print "ok 2\n";
}
else
{
    print "not ok 2\n";
}

if (defined LOCALE_CODE_DEFAULT
    && (LOCALE_CODE_DEFAULT == LOCALE_CODE_ALPHA_2
	|| LOCALE_CODE_DEFAULT == LOCALE_CODE_ALPHA_3
	|| LOCALE_CODE_DEFAULT == LOCALE_CODE_NUMERIC))
{
    print "ok 3\n";
}
else
{
    print "not ok 3\n";
}

exit 0;

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.