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