gctest is used to invoke the GnuCOBOL compiler, then execute the program
It will capture output from the compiler and program execution to create
an autotest file suitable for inclusion in the GnuCOBOL testsuite.

You have to manually merge in the created program.at file your self.

To compile this run:
  make

To install it run:
  make install

gctest 'usage' display:

GnuCOBOL compile a COBOL program, execute & capture output
to create an autotest.at file named from -p programname
 
  gctest [options]
Where [options] are:
  -p program      The COBOL program to compile and test
  -C mod.c        A C module used by 'program' to compile
  -B copybook     Include 'copybook' to autotest file for compile
  -i inputfile    Define input file for test program
  -o outputfile   Define Output report file
  -O LSoutfile    Define LINE SEQUENIAL output file
  -a              Append to program.at; Default is write
  -b              Make test code start with blank line
  -e              test compile only; Expecting errors
  -E              compile only; ... Expecting errors
  -fisam          Requires a COBOL compiler with INDEXED file support
  -f opt          Add '-f opt' to compile command
  -F opt          Add '-opt' to compile command
  -g              compile as shared module
  -M name         use 'name.at' for autotest file name
  -m              use -std=mf  
  -I              use -std=ibm 
  -t std          use -std=std; (mf,ibm,2002,2014,85,ibm,mvs,
                                  acu,bs2000,realia,xopen)
  -w              Compile with no warnings
  -S name=value   Environment variable to be set for test
  -D name=value   Compiler Directing variable is set to value
  -X name=value   Push environment variable before running 'cobc'
  -Z filename     File to be captured which is output by compiler
  -c "compile command"  
  -k "Test keywords"  
  -s "Test setup name"  
 
Example command:
 gctest -m -b -k report -s "Sample REPORT" -i STUDENT=./student0.inp \
           -o REPORT1=./REPORT0.txt -p rwtst0.bat
