Commit b2595ed7 authored by Pavel Vainerman's avatar Pavel Vainerman

add test: conftest

parent 4c0f54da
......@@ -183,6 +183,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Thu Feb 04 2010 Pavel Vainerman <pv@altlinux.ru> 0.97-eter53
- new build
* Tue Feb 02 2010 Larik Ishkulov <gentro@etersoft.ru> 0.97-eter52
- new build
......
......@@ -2,7 +2,7 @@
# This file is part of the UniSet library #
############################################################################
noinst_PROGRAMS = passivetimer unixml ui umutex
noinst_PROGRAMS = passivetimer unixml ui umutex conftest
passivetimer_SOURCES = passivetimer.cc
passivetimer_LDADD = $(top_builddir)/lib/libUniSet.la
......@@ -20,6 +20,10 @@ umutex_SOURCES = umutex.cc
umutex_LDADD = $(top_builddir)/lib/libUniSet.la
umutex_CPPFLAGS = -I$(top_builddir)/include
conftest_SOURCES = conftest.cc
conftest_LDADD = $(top_builddir)/lib/libUniSet.la
conftest_CPPFLAGS = -I$(top_builddir)/include
include $(top_builddir)/conf/setting.mk
// --------------------------------------------------------------------------
//! \version $Id: smemory.cc,v 1.1 2008/12/14 21:57:50 vpashka Exp $
// --------------------------------------------------------------------------
#include <string>
#include "Debug.h"
#include "Configuration.h"
// --------------------------------------------------------------------------
using namespace std;
using namespace UniSetTypes;
// --------------------------------------------------------------------------
int main(int argc, const char **argv)
{
if( argc>1 && strcmp(argv[1],"--help")==0 )
{
cout << "--confile - Configuration file. Default: test.xml" << endl;
return 0;
}
try
{
string confile = UniSetTypes::getArgParam( "--confile", argc, argv, "test.xml" );
conf = new Configuration(argc, argv, confile);
string t(conf->oind->getTextName(1));
cout << "**** check getTextName: " << ( t.empty() ? "FAILED" : "OK" ) << endl;
return 0;
}
catch(SystemError& err)
{
cerr << "(conftest): " << err << endl;
}
catch(Exception& ex)
{
cerr << "(conftest): " << ex << endl;
}
catch(...)
{
cerr << "(conftest): catch(...)" << endl;
}
return 1;
}
#!/bin/sh
SID=$1
[ -z "$SID" ] && SID=1
uniset-start.sh -f ./conftest --confile test.xml
#--unideb-add-levels system,info,level9
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment