Skip to content

v2.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 14 Sep 13:59
eb3c379

Smoke v2.2.0 adds support for the contains: operator. This allows you to perform a substring match when you don't want to check the entire contents of STDOUT, STDERR or files.

From the additions to the README:

We don't always want to check the full output; sometimes checking that it contains a given substring is more useful. We can use the contains: operator to specify this:

tests:
  # ...
  - name: big multiplication
    stdin: |
      961748927 * 982451653
    stdout:
      contains: "1021"

Note that we don't use | here, as we don't want to capture the trailing newline, which would make this test fail. Instead we use quotes around the value to ensure that the YAML parser treats it as a string, not a number.

You can also use equals: to explicitly specify that we're checking equality, though this is the default.

Enjoy!