mirror of
https://github.com/zunit-zsh/zunit.git
synced 2026-09-10 06:36:15 -04:00
23 lines
543 B
Bash
23 lines
543 B
Bash
#!/usr/bin/env zunit
|
|
|
|
@test 'Test _zunit_assert_does_not_contain success' {
|
|
run assert 'yellow' does_not_contain 'foo'
|
|
|
|
assert "$output" is_empty
|
|
assert $state equals 0
|
|
}
|
|
|
|
@test 'Test _zunit_assert_does_not_contain success with empty value' {
|
|
run assert '' does_not_contain 'foo'
|
|
|
|
assert "$output" is_empty
|
|
assert $state equals 0
|
|
}
|
|
|
|
@test 'Test _zunit_assert_does_not_contain failure' {
|
|
run assert 'foobar' does_not_contain 'foo'
|
|
|
|
assert "$output" same_as "'foobar' contains 'foo'"
|
|
assert $state equals 1
|
|
}
|