Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 587 Bytes

File metadata and controls

29 lines (21 loc) · 587 Bytes

<< back

Example: exit_codes

result stores information from the last command executed by a "run" action. Offers many functions) that transforms output data, and also exitcode is captured.

Example 1: ok and fail

  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

Example 2: range and array

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

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