Skip to content

Comparisons expressions¤

Overview¤

Test expression evaluates inputs and returns boolean value true or false based on the result of the test.

  • !EQ: Equal
  • !NE: Not equal
  • !LT: Less than
  • !LE: Less than or equal to
  • !GT: Greater than
  • !GE: Greater than or equal to

!EQ¤

Equal to.

Type: Sequence.

Example

!EQ
- !ARG count
- 3

This compares count argument with 3, returns count == 3


!NE¤

Not equal to.

Type: Sequence.

This is negative counterpart to !EQ.

Example

!NE
- !ARG name
- Frodo

This compares name argument with Frodo, returns name != Frodo.


!LT¤

Less than.

Type: Sequence.

Example

!LT
- !ARG count
- 5

Example of a count < 5 test.


!LE¤

Less than or equal to.

Type: Sequence.

Example

!LE
- 2
- !ARG count
- 5

Example of a range 2 <= count <= 5 test.


!GT¤

Greater than.

Type: Sequence.

Example

!GT [!ARG count, 5]

Example of a count > 5 test using a compacted YAML form.


!GE¤

Greater than or equal to.

Type: Sequence.

Example

!GE
- !ARG count
- 5

Example of a count >= 5 test.