Sha256: ce3b7be8a507914d7a4f432b6590a392be748ce49d7e4ca7ee76579d8958cbf2

Contents?: true

Size: 570 Bytes

Versions: 7

Compression:

Stored size: 570 Bytes

Contents

[<< back](README.md)

# Example: exit_codes

`result` stores information from the last command executed by a "run" action. [Offers many functions](../dsl/definition/result.md)) that transforms output data, and also exitcode is captured.

## Example

```ruby
  target "Exist user root (exit code ok)"
  run "id root"
  expect_exit 0

  target "No user vader (exit code fail)"
  run "id vader"
  expect_exit 1
```

## More examples

```ruby
  target "Using a range"
  run "id vader"
  expect_exit 1..3

  target "Using a list"
  run "id vader"
  expect_exit [1, 3, 7]
```

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
teuton-2.9.2 docs/learn/21-exit_codes.md
teuton-2.9.1 docs/learn/21-exit_codes.md
teuton-2.9.0 docs/learn/21-exit_codes.md
teuton-2.8.0 docs/learn/21-exit_codes.md
teuton-2.7.3 docs/learn/21-exit_codes.md
teuton-2.7.2 docs/learn/21-exit_codes.md
teuton-2.7.1 docs/learn/21-exit_codes.md