xref: /openssl/test/recipes/30-test_evp_extra.t (revision d8170931)
1#! /usr/bin/env perl
2# Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License").  You may not use
5# this file except in compliance with the License.  You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9
10use strict;
11use warnings;
12
13use OpenSSL::Test qw/:DEFAULT bldtop_dir srctop_file/;
14use OpenSSL::Test::Utils;
15
16setup("test_evp_extra");
17
18my $no_conf_autoload = disabled('autoload-config');
19
20plan tests => $no_conf_autoload ? 3 : 4;
21
22ok(run(test(["evp_extra_test"])), "running evp_extra_test");
23
24unless ($no_conf_autoload) {
25    local $ENV{OPENSSL_CONF} = srctop_file("test","default-for-evptest.cnf");
26    ok(run(test(["evp_extra_test", "-config", srctop_file("test","default-for-evptest.cnf")])),
27       "running evp_extra_test to test evp properties set in config");
28    delete local $ENV{OPENSSL_CONF};
29}
30
31# Run tests with a non-default library context
32ok(run(test(["evp_extra_test", "-context"])), "running evp_extra_test with a non-default library context");
33
34ok(run(test(["evp_extra_test2"])), "running evp_extra_test2");
35