put7.gms : Test bad $on/offput in if statement

Description

Contributor: Alex


Small Model of Type : GAMS


Category : GAMS Test library


Main file : put7.gms

$title 'Test bad $on/offput in if statement'  (PUT7,SEQ=314)

$onText

Contributor: Alex
$offText

file f / temp.txt /; putclose f 'garbage' ;
if(1,
$onPut
this is true
$offPut
else
$onPut
this is false
$offPut
);
putclose;
execute '=grep false temp.txt';
abort$(errorlevel=0) 'should not be there';