Conformance Examples 0.1.0 — Render: logical-operators¶
or-true-true¶
Both operands truthy: or evaluates to true.
Template
Context
Output
or-true-false¶
One truthy operand suffices: or evaluates to true.
Template
Context
Output
or-false-true¶
One truthy operand suffices regardless of position: or evaluates to true.
Template
Context
Output
or-false-false¶
Both operands falsy: or evaluates to false.
Template
Context
Output
or-uppercase¶
OR in all-caps is recognised identically to lowercase.
Template
Context
Output
or-mixed-case¶
Or with mixed case is recognised identically to lowercase.
Template
Context
Output
and-true-true¶
Both operands truthy: and evaluates to true.
Template
Context
Output
and-true-false¶
One falsy operand: and evaluates to false.
Template
Context
Output
and-empty-string-and-nonempty¶
Empty string is falsy under kBars truthiness; and short-circuits to false.
Template
Context
Output
and-empty-array-and-object¶
Empty array is falsy and any object is truthy: and evaluates to false.
Template
Context
Output
or-missing-and-literal¶
Missing identifier resolves to null (falsy); a non-empty string literal is truthy; or evaluates to true.
Template
Context
Output
or-zero-and-zero-point-zero¶
Numeric literal 0 and 0.0 are both falsy under truthiness: or evaluates to false.
Template
Context
Output
or-zero-and-one¶
0 is falsy, 1 is truthy: or evaluates to true.
Template
Context
Output
and-in-if-block¶
Logical operators flow naturally through #if expression slots.
Template
Context
Output
or-in-unless-block¶
Logical operators flow through #unless expression slots; both operands falsy means the body renders.
Template
Context
Output
or-triple-mustache¶
Triple-mustache renders the binary result (a boolean) verbatim; the HTML-looking literal '' does not appear in the output because the operator returned the boolean true.
Template
Context
Output
Source fixture: render/logical-operators.json