def no.main

ezx@1.11.0.0 · src/ez/ends.bend:31

import ezx@1.11.0.0/src/ez/ends.bend as Ends
import Base

31# `bend f -o out` checks without running main. A clean file prints nothing at
32# all, and a library entry, having no main, checks clean and then exits 1 with
33# "no main to run" from the emit. A check failure throws before the emit, so
34# that message can only follow a check that passed.
35#
36# It is matched as a whole line, because that is the shape of the thing being
37# claimed: bend prints it as `Error: no main to run` and nothing else. Asked as
38# a substring of the whole output, the same words appearing anywhere (inside
39# some other error's text, or in a source line bend echoed back while
40# reporting on it) would answer yes and mean nothing, and a failing check
41# would read as a passing one. Two other line-shaped facts in this tree were
42# being asked of whole files the same way, and one of them silently dropped a
43# test before it was caught.
44def no.main(+line: String) -> Bool:
45  String.eq(line, "Error: no main to run")

Uses (3)

Used by (1)