mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-21 20:35:10 +00:00
Improve formatting in tests.
This commit is contained in:
parent
1d948837d0
commit
8f6a700909
@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
# `hosts block` #################################################################
|
||||
# `hosts block` ###############################################################
|
||||
|
||||
@test "\`block\` with no arguments exits with status 1." {
|
||||
run "${_HOSTS}" block
|
||||
@ -28,7 +28,7 @@ load test_helper
|
||||
[[ "${lines[1]}" == " hosts block <hostname>..." ]]
|
||||
}
|
||||
|
||||
# `hosts block <hostname>` #################################################
|
||||
# `hosts block <hostname>` ####################################################
|
||||
|
||||
@test "\`block <hostname>\` exits with status 0." {
|
||||
run "${_HOSTS}" block example.com
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
# `hosts disabled` #############################################################
|
||||
# `hosts disabled` ############################################################
|
||||
|
||||
@test "\`disabled\` with no arguments exits with status 0." {
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
# `hosts list` #############################################################
|
||||
# `hosts list` ################################################################
|
||||
|
||||
@test "\`list\` exits with status 0." {
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
# `hosts remove` #################################################################
|
||||
# `hosts remove` ##############################################################
|
||||
|
||||
@test "\`remove\` with no arguments exits with status 1." {
|
||||
run "${_HOSTS}" remove
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
# `hosts search` #############################################################
|
||||
# `hosts search` ##############################################################
|
||||
|
||||
@test "\`search\` with no arguments exits with status 1." {
|
||||
{
|
||||
@ -73,7 +73,7 @@ Description:
|
||||
[[ "${lines[4]}" =~ 127.0.0.2[[:space:]]+example.com ]]
|
||||
}
|
||||
|
||||
# `hosts search disabled` #######################################################
|
||||
# `hosts search disabled` #####################################################
|
||||
|
||||
@test "\`search disabled\` exits with status 0." {
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
# `hosts show` ##############################################################
|
||||
# `hosts show` ################################################################
|
||||
|
||||
@test "\`show\` with no arguments exits with status 1." {
|
||||
run "${_HOSTS}" show
|
||||
@ -37,7 +37,7 @@ load test_helper
|
||||
[[ "${lines[0]}" =~ No\ matching\ entries ]]
|
||||
}
|
||||
|
||||
# `hosts show <ip>` #########################################################
|
||||
# `hosts show <ip>` ###########################################################
|
||||
|
||||
@test "\`show <ip>\` exits with status 0 and shows all matches." {
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
# `hosts unblock` #################################################################
|
||||
# `hosts unblock` #############################################################
|
||||
|
||||
@test "\`unblock\` with no arguments exits with status 1." {
|
||||
run "${_HOSTS}" unblock
|
||||
@ -28,7 +28,7 @@ load test_helper
|
||||
[[ "${lines[1]}" == " hosts unblock <hostname>..." ]]
|
||||
}
|
||||
|
||||
# `hosts unblock <invalid>` ############################################
|
||||
# `hosts unblock <invalid>` ###################################################
|
||||
|
||||
@test "\`unblock <invalid> \` exits with status 1." {
|
||||
{
|
||||
@ -52,7 +52,7 @@ load test_helper
|
||||
[[ ${output} == "${_ERROR_PREFIX}No matching records found." ]]
|
||||
}
|
||||
|
||||
# `hosts unblock <hostname>` ###########################################
|
||||
# `hosts unblock <hostname>` ##################################################
|
||||
|
||||
@test "\`unblock <hostname>\` exits with status 0." {
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user