2021-08-19 19:05:15 +08:00
|
|
|
#! /usr/bin/env perl
|
2018-02-27 20:55:35 +08:00
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use OpenSSL::Test qw/:DEFAULT data_file/;
|
|
|
|
use OpenSSL::Test::Utils;
|
|
|
|
|
|
|
|
setup("test_includes");
|
|
|
|
|
|
|
|
plan skip_all => "test_includes doesn't work without posix-io"
|
|
|
|
if disabled("posix-io");
|
|
|
|
|
2020-04-30 23:08:57 +08:00
|
|
|
delete $ENV{OPENSSL_CONF_INCLUDE};
|
|
|
|
|
2018-03-12 06:47:40 +08:00
|
|
|
plan tests => # The number of tests being performed
|
2021-05-01 00:18:00 +08:00
|
|
|
6
|
2018-03-12 06:47:40 +08:00
|
|
|
+ ($^O eq "VMS" ? 2 : 0);
|
2018-02-27 20:55:35 +08:00
|
|
|
|
|
|
|
ok(run(test(["conf_include_test", data_file("includes.cnf")])), "test directory includes");
|
|
|
|
ok(run(test(["conf_include_test", data_file("includes-file.cnf")])), "test file includes");
|
2019-02-01 21:32:36 +08:00
|
|
|
ok(run(test(["conf_include_test", data_file("includes-eq.cnf")])), "test includes with equal character");
|
|
|
|
ok(run(test(["conf_include_test", data_file("includes-eq-ws.cnf")])), "test includes with equal and whitespaces");
|
2018-03-12 06:47:40 +08:00
|
|
|
if ($^O eq "VMS") {
|
|
|
|
ok(run(test(["conf_include_test", data_file("vms-includes.cnf")])),
|
|
|
|
"test directory includes, VMS syntax");
|
|
|
|
ok(run(test(["conf_include_test", data_file("vms-includes-file.cnf")])),
|
|
|
|
"test file includes, VMS syntax");
|
|
|
|
}
|
2018-08-16 10:36:01 +08:00
|
|
|
ok(run(test(["conf_include_test", "-f", data_file("includes-broken.cnf")])), "test broken includes");
|
2021-05-01 00:18:00 +08:00
|
|
|
ok(run(test(["conf_include_test", "-f", data_file("incdir.cnf")])), "test includedir");
|