Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodalgaard committed Sep 27, 2023
1 parent aeb2b05 commit 2739db1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

. src/helpers.sh

NAME="$(getPrimaryInterfaceName)"
echo $NAME

DNSSTRING=$(getDNS "$(networksetup -getdnsservers "$NAME")")
echo $DNSSTRING
10 changes: 9 additions & 1 deletion tests/apTests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ load variables
[ "${ARRAY[6]}" == $ICON_WIFI_LOCK ]
}


@test "getAPDetails: active BSSID can contain starting zeros" {
INPUT=" New AP 50:0d:0f:56:00:2e -54 132,+1 Y DK WPA2(PSK/AES/AES) "

Expand All @@ -148,6 +147,15 @@ load variables
[ "${ARRAY[6]}" == $ICON_WIFI_ACTIVE ]
}

@test "getAPDetails: filter empty SSIDs" {
INPUT=" 50:0d:0f:56:00:2e -54 132,+1 Y DK WPA2(PSK/AES/AES) "

run getAPDetails "$INPUT"
IFS='~' read -r -a ARRAY <<< "$output"

[ "${#ARRAY[@]}" == 0 ]
}

@test "getAPDetails: favorited AP is marked with an icon" {
INPUT=" New AP 50:1d:bf:56:2f:2e -54 132,+1 Y DK WPA2(PSK/AES/AES) "
AP_LIST="New AP
Expand Down

0 comments on commit 2739db1

Please sign in to comment.