# test JR_RMIC_CACHED caching
# note that jrv's jr_rmic creates jrGen/JR_RMIC.out

# need to make sure no cache sometime before first caching run
# (normally, it's removed at end, so all's well,
# but if there are problems, then it's left around.)
0 rm -rf JR_RMIC_CACHED

# first run w/o caching
0 RCoff
0 jrc *.jr
0 javac jrGen/*.java
0 cd jrGen
0 jr_rmic
0 cd ..
0 cmp JR_RMIC_off.std jrGen/JR_RMIC.out
0 run main
0 rm -rf jrGen core *.out

# turn on caching
0 RCon ./JR_RMIC_CACHED

# now run with caching
0 jrc *.jr
0 javac jrGen/*.java
0 cd jrGen
0 jr_rmic
0 cd ..
0 cmp JR_RMIC_cold.std jrGen/JR_RMIC.out
0 run main
0 rm -rf jrGen core *.out

# now run again with caching
0 jrc *.jr
0 javac jrGen/*.java
0 cd jrGen
0 jr_rmic
0 cd ..
0 cmp JR_RMIC_warm.std jrGen/JR_RMIC.out
0 run main
0 rm -rf jrGen core *.out

# restore caching within jrv
0 RCrestore
0 rm -rf JR_RMIC_CACHED
