set -e

$NXF_RUN | tee stdout
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > MAKE_SAMPLE') == 1 ]]
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > P1') == 1 ]]
grep 'test1 test2' stdout

$NXF_RUN -resume | tee stdout
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > MAKE_SAMPLE') == 1 ]]
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > P1') == 1 ]]
grep 'test1 test2' stdout
