obfusc01.gms : Test use if obfuscated workfile

Description

Contributor: Michael Bussieck, March 2014


Small Model of Type : GAMS


Category : GAMS Test library


Main file : obfusc01.gms

$Title Test use if obfuscated workfile (OBFUSC01,SEQ=649)

$Ontext
Contributor: Michael Bussieck, March 2014
$Offtext


$call gamslib -q 1
$if errorlevel 1 $abort problems retrieving trnsport.gms
$echo execute_unload 'obfuscated'; >> trnsport.gms

* Compile the model and save and saveobfuscate
$call gams trnsport a=c s=0named so=0obfuscate lo=%gams.lo%
$if errorlevel 1 $abort problems creating save files

* Execute Compile the model and save and saveobfuscate
$echo $debug dmpuel dmpsym > empty.gms
$call gams empty r=0obfuscate s=1obfuscate lo=%gams.lo%
$if errorlevel 1 $abort problems running trnsport

* Make sure some well known trnsport names are absent
$call grep -qi supply empty.lst > %system.nullfile%
$if not errorlevel 1 $abort found string supply in obfuscated listing file
$call grep -qi transport empty.lst > %system.nullfile%
$if not errorlevel 1 $abort found string transport in obfuscated listing file
$call grep -qi seattle empty.lst > %system.nullfile%
$if not errorlevel 1 $abort found string seattle in obfuscated listing file

* Continued compilation and excution from obfuscated restart file without names should fail
$echo display supply.m; > display.gms
$call gams display r=1obfuscate lo=%gams.lo%
$if not errorlevel 1 $abort gams should fail on restarting without names

* Continued compilation and excution from obfuscated restart file with named restart file
$call gams display r=1obfuscate rn=0named lo=%gams.lo%
$if errorlevel 1 $abort gams should restart with restartnamed