genfile01.gms : Test generic file names

Description

This test ensures the correct behavior of of the MaxGenericFiles
option and command line parameter when writing put and GDX
files as execution time.

Contributor: Lutz Westermann, September 2021


Small Model of Type : GAMS


Category : GAMS Test library


Main file : genfile01.gms

$title Test generic file names (GENFILE01,SEQ=875)

$onText
This test ensures the correct behavior of of the MaxGenericFiles
option and command line parameter when writing put and GDX
files as execution time.

Contributor: Lutz Westermann, September 2021
$offText

$call.checkErrorLevel 'rm -rf notThere'

$onEcho > write.gms
$if set setOpt option MaxGenericFiles=10;
Scalar s /1/;
file fx /'notThere%system.DirSep%missing.txt'/;
putClose fx '1967';
execute_unload 'notThere%system.DirSep%out.gdx', s;
$offEcho

$call.checkErrorLevel 'gams write.gms lo=%GAMS.lo%';
$call 'gams write.gms lo=%GAMS.lo% MaxGenericFiles=0';
$ifE errorLevel=0 $abort Expected error
$call.checkErrorLevel 'gams write.gms lo=%GAMS.lo% MaxGenericFiles=0 --setOpt=1';