mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
Add iwlist <iface> freq test case
This commit is contained in:
parent
56d1655727
commit
8778a2e9d6
1 changed files with 20 additions and 1 deletions
|
@ -15,9 +15,28 @@ func TestProcessSupportedFrequencies(t *testing.T) {
|
|||
ExpectedFreqs []int
|
||||
ExpectedError bool
|
||||
}{
|
||||
{
|
||||
"Returns appropriately formatted frequencies on valid input",
|
||||
`wlan1 11 channels in total; available frequencies :
|
||||
Channel 01 : 2.412 GHz
|
||||
Channel 02 : 2.417 GHz
|
||||
Channel 03 : 2.422 GHz
|
||||
Channel 04 : 2.427 GHz
|
||||
Channel 05 : 2.432 GHz
|
||||
Channel 06 : 2.437 GHz
|
||||
Channel 07 : 2.442 GHz
|
||||
Channel 08 : 2.447 GHz
|
||||
Channel 09 : 2.452 GHz
|
||||
Channel 10 : 2.457 GHz
|
||||
Channel 11 : 2.462 GHz
|
||||
Current Frequency:2.437 GHz (Channel 6)`,
|
||||
nil,
|
||||
[]int{2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"Returns empty with an error",
|
||||
"Shouldn't matter",
|
||||
"Doesn't matter",
|
||||
errors.New("iwlist must have failed"),
|
||||
[]int{},
|
||||
true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue