90-test_includes.t 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #! /usr/bin/env perl
  2. use strict;
  3. use warnings;
  4. use OpenSSL::Test qw/:DEFAULT bldtop_dir data_file/;
  5. use OpenSSL::Test::Utils;
  6. use Cwd qw(abs_path);
  7. setup("test_includes");
  8. plan skip_all => "test_includes doesn't work without posix-io"
  9. if disabled("posix-io");
  10. delete $ENV{OPENSSL_CONF_INCLUDE};
  11. plan tests => # The number of tests being performed
  12. 7
  13. + ($^O eq "VMS" ? 2 : 0);
  14. $ENV{OPENSSL_MODULES} = abs_path(bldtop_dir("providers"));
  15. ok(run(test(["conf_include_test", data_file("includes.cnf")])), "test directory includes");
  16. ok(run(test(["conf_include_test", data_file("includes-file.cnf")])), "test file includes");
  17. ok(run(test(["conf_include_test", data_file("includes-eq.cnf")])), "test includes with equal character");
  18. ok(run(test(["conf_include_test", data_file("includes-eq-ws.cnf")])), "test includes with equal and whitespaces");
  19. if ($^O eq "VMS") {
  20. ok(run(test(["conf_include_test", data_file("vms-includes.cnf")])),
  21. "test directory includes, VMS syntax");
  22. ok(run(test(["conf_include_test", data_file("vms-includes-file.cnf")])),
  23. "test file includes, VMS syntax");
  24. }
  25. ok(run(test(["conf_include_test", "-f", data_file("includes-broken.cnf")])), "test broken includes");
  26. ok(run(test(["conf_include_test", "-f", data_file("incdir.cnf")])), "test includedir");
  27. SKIP: {
  28. skip "Skipping legacy test", 1
  29. if disabled("legacy");
  30. ok(run(test(["conf_include_test", "-providers", data_file("includes-prov-dir.cnf")])),
  31. "test directory includes with provider configs");
  32. }