90-test_includes.t 1.2 KB

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