From 6cefc0ff776364ce8a01a5cbc11fc3eea55942ba Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 12 Aug 2006 15:19:21 +0000 Subject: In 'check', always initialize the library and run basic self tests, even if run with no arguments. --- checks/check.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'checks/check.cpp') diff --git a/checks/check.cpp b/checks/check.cpp index 5b0bcbfe6..6a7705090 100644 --- a/checks/check.cpp +++ b/checks/check.cpp @@ -33,21 +33,17 @@ int main(int argc, char* argv[]) { try { - if(argc <= 1) - { print_help(); return 1; } - OptionParser opts("help|html|init=|validate|" "benchmark|bench-type=|bench-algo=|seconds="); opts.parse(argv); - if(opts.is_set("help")) - { print_help(); return 1; } - std::string init_flags = (opts.is_set("init") ? opts.value("init") : ""); Botan::InitializerOptions init_options(init_flags); Botan::LibraryInitializer init(init_options); + if(opts.is_set("help") || argc <= 1) + { print_help(); return 1; } if(opts.is_set("validate")) return validate(); -- cgit v1.2.3