2023-05-25 21:43:07 +02:00
|
|
|
use std log
|
2023-05-27 14:45:04 +02:00
|
|
|
use std assert
|
2023-04-10 22:42:11 +02:00
|
|
|
|
2023-06-10 20:16:17 +02:00
|
|
|
def before-each [] {
|
2023-04-10 22:42:11 +02:00
|
|
|
log debug "Setup is running"
|
|
|
|
{msg: "This is the context"}
|
|
|
|
}
|
|
|
|
|
2023-06-10 20:16:17 +02:00
|
|
|
def after-each [] {
|
2023-04-10 22:42:11 +02:00
|
|
|
log debug $"Teardown is running. Context: ($in)"
|
|
|
|
}
|
|
|
|
|
2023-06-10 20:16:17 +02:00
|
|
|
def test_assert_pass [] {
|
2023-04-10 22:42:11 +02:00
|
|
|
log debug $"Assert is running. Context: ($in)"
|
|
|
|
}
|
|
|
|
|
2023-06-10 20:16:17 +02:00
|
|
|
def test_assert_skip [] {
|
2023-04-10 22:42:11 +02:00
|
|
|
log debug $"Assert is running. Context: ($in)"
|
|
|
|
assert skip
|
|
|
|
}
|
|
|
|
|
2023-06-10 20:16:17 +02:00
|
|
|
def test_assert_fail_skipped_by_default [] {
|
2023-04-10 22:42:11 +02:00
|
|
|
assert skip # Comment this line if you want to see what happens if a test fails
|
|
|
|
log debug $"Assert is running. Context: ($in)"
|
|
|
|
assert false
|
|
|
|
}
|
|
|
|
|
2023-06-10 20:16:17 +02:00
|
|
|
def unrelated [] {
|
2023-04-10 22:42:11 +02:00
|
|
|
log error "This should not run"
|
|
|
|
}
|