#!/bin/bash

"$FLOW" stop

start_flow . --lazy-mode ide

printf "===== signature-verification error should not be reported, just the parsing error: =====\\n"
assert_errors "$FLOW" status --no-auto-start

printf "\\n\\n===== suppressed signature-verification error should not be reported after focus-checking suppressed_signature_verification_error.js: =====\\n"
assert_ok "$FLOW" force-recheck --focus suppressed_signature_verification_error.js
assert_errors "$FLOW" status --no-auto-start

printf "\\n\\n===== unsuppressed signature-verification error should be reported after focus-checking signature_verification_error.js: =====\\n"
assert_ok "$FLOW" force-recheck --focus signature_verification_error.js
assert_errors "$FLOW" status --no-auto-start

printf "\\n\\n===== unsuppressed signature-verification error in file which is part of a cycle should be reported when focusing on another part of the cycle =====\\n"
assert_ok "$FLOW" force-recheck --focus cycleA.js
assert_errors "$FLOW" status --no-auto-start
