set -e

#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout

[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > nativeCode'` == 1 ]] || false
grep 'Hello world' stdout


#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout

[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > nativeCode'` == 1 ]] || false
grep 'Hello world' stdout
