You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: cozytest.sh rewrites a lone closing brace inside a heredoc into return 0 #4667
hack/cozytest.sh turns every line that is exactly } into return 0 when it rewrites a bats file into shell functions. It does this without knowing whether the line sits inside a heredoc, so a test that writes a JSON or JS fixture through a heredoc ending a block with a bare } gets return 0 in the middle of its fixture: the fixture is corrupted and the test returns early, green. Found while writing hack/pr-labeler-contract.bats in #4666, which had to avoid the shape. Fix shape: skip the rewrite inside heredocs (track <<WORD until the terminator), or rewrite only the brace that closes a @test block, and add a bats case with a heredoc fixture that contains a bare } line. Related to #4620 and the move to vanilla Bats in #3849.
Activity