mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
add test for GetOr function
This commit is contained in:
parent
00d6100214
commit
21c0fc43ca
1 changed files with 10 additions and 0 deletions
|
@ -57,3 +57,13 @@ func TestMetaSetInts(t *testing.T) {
|
|||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMetaGetOr(t *testing.T) {
|
||||
example := buildExampleMeta()
|
||||
dflt := "picat"
|
||||
exp := dflt
|
||||
got := example.GetOr("evilsocket", dflt)
|
||||
if exp != got {
|
||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue