output01.gms : Test Output related Command Line Parameters

Description

Test expected behavior of Command Line Parameters Output and write Output.

Contributor: Lutz Westermann, March 2023


Small Model of Type : GAMS


Category : GAMS Test library


Main file : output01.gms

$title 'Test Output related Command Line Parameters (OUTPUT01,SEQ=935)

$onText
Test expected behavior of Command Line Parameters Output and write Output.

Contributor: Lutz Westermann, March 2023
$offText


$call.checkErrorLevel rm -rf test.lst otherFile.txt
$if     exist test.lst      $abort WorkDir not clean
$if     exist otherFile.txt $abort WorkDir not clean

$echo $log did somthing > test.gms

$call.checkErrorLevel gams test.gms lo=%GAMS.lo%
$if NOT exist test.lst      $abort Expect test.lst with default run

$call.checkErrorLevel rm -rf test.lst
$if     exist test.lst      $abort WorkDir not clean

$call.checkErrorLevel gams test.gms lo=%GAMS.lo% output=otherFile.txt
$if     exist test.lst      $abort Did not expect test.lst with output=otherFile.txt
$if NOT exist otherFile.txt $abort Expect otherFile.txt with output=otherFile.txt

$call.checkErrorLevel rm -rf otherFile.txt
$if     exist otherFile.txt $abort WorkDir not clean

$call.checkErrorLevel gams test.gms lo=%GAMS.lo% writeOutput=0
$if     exist test.lst      $abort Did not expect test.lst with writeOutput=0

$call.checkErrorLevel gams test.gms lo=%GAMS.lo% writeOutput=0 output=otherFile.txt
$if     exist test.lst      $abort Did not expect test.lst with writeOutput=0 and output=otherFile.txt
$if     exist otherFile.txt $abort Did not expect otherFile.txt with writeOutput=0 and output=otherFile.txt