20-test_app.t 936 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #! /usr/bin/env perl
  2. # Copyright 2020-2023 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. use strict;
  9. use warnings;
  10. use OpenSSL::Test;
  11. setup("test_app");
  12. plan tests => 7;
  13. ok(run(app(["openssl"])),
  14. "Run openssl app with no args");
  15. ok(run(app(["openssl", "help"])),
  16. "Run openssl app with help");
  17. ok(!run(app(["openssl", "-wrong"])),
  18. "Run openssl app with incorrect arg");
  19. ok(run(app(["openssl", "-help"])),
  20. "Run openssl app with -help");
  21. ok(run(app(["openssl", "--help"])),
  22. "Run openssl app with --help");
  23. ok(run(app(["openssl", "-version"])),
  24. "Run openssl app with -version");
  25. ok(run(app(["openssl", "--version"])),
  26. "Run openssl app with --version");