From b372ce388aad26beabd88984f7202bde386d1d9e Mon Sep 17 00:00:00 2001 From: rjpadilla Date: Wed, 7 Apr 2021 04:57:02 +0300 Subject: [PATCH] update /tests/wificountry.bats (fixes #2165) --- tests/wificountry.bats | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/wificountry.bats b/tests/wificountry.bats index d8bb600544..8832b7993f 100755 --- a/tests/wificountry.bats +++ b/tests/wificountry.bats @@ -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=' -} \ No newline at end of file +@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' +}