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