mirror of
https://github.com/zunit-zsh/zunit.git
synced 2026-09-10 06:36:15 -04:00
20 lines
471 B
Bash
20 lines
471 B
Bash
#!/usr/bin/env zunit
|
|
|
|
@test 'Test _zunit_assert_is_negative success' {
|
|
run assert -1 is_negative
|
|
assert $state equals 0
|
|
assert $output is_empty
|
|
}
|
|
|
|
@test 'Test _zunit_assert_is_negative failure' {
|
|
run assert 1 is_negative
|
|
assert $state equals 1
|
|
assert $output same_as "'1' is not negative"
|
|
}
|
|
|
|
@test 'Test _zunit_assert_is_negative failure with empty value' {
|
|
run assert '' is_negative
|
|
assert $state equals 1
|
|
assert $output same_as "'' is not negative"
|
|
}
|