Back to home page

Enduro/X

 
 

    


0001 /**
0002  *
0003  * @file test_mkfldhdr.c
0004  */
0005 /* -----------------------------------------------------------------------------
0006  * Enduro/X Middleware Platform for Distributed Transaction Processing
0007  * Copyright (C) 2009-2016, ATR Baltic, Ltd. All Rights Reserved.
0008  * Copyright (C) 2017-2018, Mavimax, Ltd. All Rights Reserved.
0009  * This software is released under one of the following licenses:
0010  * GPL or Mavimax's license for commercial use.
0011  * -----------------------------------------------------------------------------
0012  * GPL license:
0013  * 
0014  * This program is free software; you can redistribute it and/or modify it under
0015  * the terms of the GNU General Public License as published by the Free Software
0016  * Foundation; either version 3 of the License, or (at your option) any later
0017  * version.
0018  *
0019  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
0020  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0021  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
0022  *
0023  * You should have received a copy of the GNU General Public License along with
0024  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
0025  * Place, Suite 330, Boston, MA 02111-1307 USA
0026  *
0027  * -----------------------------------------------------------------------------
0028  * A commercial use license is available from Mavimax, Ltd
0029  * contact@mavimax.com
0030  * -----------------------------------------------------------------------------
0031  */
0032 
0033 #include <stdio.h>
0034 #include <stdlib.h>
0035 #include <cgreen/cgreen.h>
0036 #include <ubf.h>
0037 #include <ndrstandard.h>
0038 #include <string.h>
0039 #include "test.fd.h"
0040 #include "ubfunit1.h"
0041 
0042 /**
0043  * Calls scripts for checing mkfldhdr. Return code says
0044  * was OK or not OK.
0045  */
0046 Ensure(test_mkfldhdr)
0047 {
0048     assert_equal(system("./test_mkfldhdr_cmd.sh"), EXSUCCEED);
0049     assert_equal(system("./test_mkfldhdr_env.sh"), EXSUCCEED);
0050     assert_not_equal(system("./test_mkfldhdr_err_output.sh"), EXSUCCEED);
0051     assert_not_equal(system("./test_mkfldhdr_no_FLDTBLDIR.sh"), EXSUCCEED);
0052     assert_not_equal(system("./test_mkfldhdr_no_FIELDTBLS.sh"), EXSUCCEED);
0053     assert_not_equal(system("./test_mkfldhdr_syntax_err.sh"), EXSUCCEED);
0054 
0055 }
0056 
0057 TestSuite *ubf_mkfldhdr_tests(void)
0058 {
0059     TestSuite *suite = create_test_suite();
0060 
0061     add_test(suite, test_mkfldhdr);
0062 
0063     return suite;
0064 }
0065 
0066