|
From: | Joe Robbins |
Subject: | [open-cobol-list] COBOL85 Test Suite |
Date: | Fri, 13 Dec 2013 17:50:45 +0000 |
I was wondering if anyone has advice about a particular aspect of the COBOL85 test suite.
I have implemented a module in fileio of GNU COBOL that stores INDEXED files in a database accessed via ODBC. Having finished the code and tested with some (simple) internal test programs, I came to test it using the COBOL85 test suite distributed with OpenCOBOL / GNU COBOL. And a conundrum of the test suite that has bugged me for a while has now become clear.
Some programs in the suite test work on the assumption that a data file will not be found by the program. For example IX218A.CBL has this comment block:
The code operates on the (false) premise that running "make clean" will remove all the test data files at the start of the run because the working directory is made a-new. But if the files are somewhere else (for example in a database) then tests like IX218A fail.
This explains some problems I had earlier: our production environment (on LINUX) always declares a value for COB_FILE_PATH. If this is set when the COBOL85 tests are run, then many tests will fail.
So the question I have is this: how immutable are the COBOL85 test programs? Would it be acceptable to insert a COBOL call to DELETE FILE at the head of the program code? Or if that is problematic, would it be OK to edit the parent scripts? Or should we just make a note (in the release docs) and leave things as they are?
Regards: Joe Robbins
P.S. I have at the same time implemented "SPARSE KEYS" with the COBOL clause:
ALTERNATE RECORD KEY key-2 SUPPRESS WHEN ALL X"00".
which someone requested a while back. (The ALL value can be any char.)
Joe Robbins |
[Prev in Thread] | Current Thread | [Next in Thread] |