From 325baa33d2d408391e52b36c3430ba8bfa3de2c4 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Mon, 13 Mar 2006 10:27:42 -0500 Subject: [PATCH] ENH: Make test usable from command line --- Source/kwsys/testDynamicLoader.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx index 82c494eea..0eb9be3f4 100644 --- a/Source/kwsys/testDynamicLoader.cxx +++ b/Source/kwsys/testDynamicLoader.cxx @@ -78,9 +78,15 @@ int TestDynamicLoader(const char* libname, const char* symbol, int r1, int r2, i return 0; } -int main(int , char *[]) +int main(int argc, char *argv[]) { int res; + if( argc == 3 ) + { + // User specify a libname and symbol to check. + res = TestDynamicLoader(argv[1], argv[2],1,1,1); + return res; + } // Make sure that inexistant lib is giving correct result res = TestDynamicLoader("azerty_", "foo_bar",0,0,0); // Make sure that random binary file cannnot be assimilated as dylib