xref: /openssl/test/recipes/02-test_localetest.t (revision e3ba938b)
1#! /usr/bin/env perl
2# Copyright 2017-2022 The OpenSSL Project Authors. All Rights Reserved.
3# Copyright (c) 2017, Oracle and/or its affiliates.  All rights reserved.
4#
5# Licensed under the Apache License 2.0 (the "License").  You may not use
6# this file except in compliance with the License.  You can obtain a copy
7# in the file LICENSE in the source distribution or at
8# https://www.openssl.org/source/license.html
9
10use OpenSSL::Test;
11use OpenSSL::Test::Utils;
12
13setup("test_locale");
14
15plan skip_all => "Locale tests not available on Windows or VMS"
16    if $^O =~ /^(VMS|MSWin32)$/;
17
18plan tests => 3;
19
20ok(run(test(["evp_pkey_ctx_new_from_name"])), "running evp_pkey_ctx_new_from_name without explicit context init");
21
22$ENV{LANG} = "C";
23ok(run(test(["localetest"])), "running localetest");
24
25$ENV{LANG} = "tr_TR.UTF-8";
26ok(run(test(["localetest"])), "running localetest with Turkish locale");
27