Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions tests/wificountry.bats
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
#!/usr/bin/env bats
load test-helper

@test "$clinom wificountry" {
run "${clicmd}" wificountry
assert_success && assert_output -p 'country='
}

@test "$clinom wificountry US" {
run "${clicmd}" wificountry US
assert_success && assert_output -p 'country has been set'
}

@test "$clinom wificountry" {
run "${clicmd}" wificountry
assert_success && assert_output -p 'country='
}
@test "$clinom wificountry foo (invalid country code)" {
run "${clicmd}" wificountry foo
assert_output -p 'invalid country code'
}

@test "$clinom wificountry us (lower case country code)" {
run "${clicmd}" wificountry us
assert_success && assert_output -p 'country has been set'
}