mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
add test for Set function
This commit is contained in:
parent
e751ecf6a0
commit
b387ed86e6
1 changed files with 13 additions and 0 deletions
|
@ -39,3 +39,16 @@ func TestAliasesGet(t *testing.T) {
|
||||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestAliasesSet(t *testing.T) {
|
||||||
|
exampleAliases := buildExampleAlaises()
|
||||||
|
exampleAliases.data = make(map[string]string)
|
||||||
|
|
||||||
|
if exampleAliases.Set("pi:ca:tw:as:he:re", "picat") != nil {
|
||||||
|
t.Error("unable to set alias")
|
||||||
|
}
|
||||||
|
|
||||||
|
if exampleAliases.Get("pi:ca:tw:as:he:re") != "picat" {
|
||||||
|
t.Error("unable to get set alias")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue