utilT.cc

Go to the documentation of this file.
00001 // utilT.C
00002 
00003 #include <iostream>
00004 #include <fstream>
00005 
00006 using std::cerr ;
00007 using std::cout ;
00008 using std::endl ;
00009 using std::ifstream ;
00010 
00011 #include "utilT.h"
00012 #include "BESUtil.h"
00013 #include "BESException.h"
00014 #include "test_config.h"
00015 
00016 int
00017 utilT::run(void)
00018 {
00019     cout << endl << "*****************************************" << endl;
00020     cout << "Entered utilT::run" << endl;
00021     int retVal = 0;
00022 
00023     cout << endl << "*****************************************" << endl;
00024     cout << "Remove escaped quotes" << endl;
00025     string s = BESUtil::unescape( "\\\"This is a test, this is \\\"ONLY\\\" a test\\\"" ) ;
00026     string result = "\"This is a test, this is \"ONLY\" a test\"" ;
00027     if( s != result )
00028     {
00029         cerr << "resulting string incorrect: " << s << " should be " << result << endl ;
00030         return 1 ;
00031     }
00032 
00033     cout << endl << "*****************************************" << endl;
00034     cout << "Returning from utilT::run" << endl;
00035 
00036     return retVal;
00037 }
00038 
00039 int
00040 main(int argC, char **argV) {
00041     string env_var = (string)"BES_CONF=" + TEST_SRC_DIR + "/bes.conf" ;
00042     putenv( (char *)env_var.c_str() ) ;
00043     Application *app = new utilT();
00044     return app->main(argC, argV);
00045 }
00046 

Generated on Sat Jan 19 04:05:37 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.4