Skip to content

Commit

Permalink
use assert_success
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Mar 19, 2024
1 parent e185b13 commit 76eebb3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
18 changes: 9 additions & 9 deletions test/include.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,45 @@ setup() {

@test "./include/djb.sh" {
run ./include/djb.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/editor.sh" {
run ./include/editor.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/mta.sh" {
run ./include/mta.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/mysql.sh" {
run ./include/mysql.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/nginx.sh" {
run ./include/nginx.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/php.sh" {
run ./include/php.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/shell.sh" {
run ./include/shell.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/user.sh" {
run ./include/user.sh
[ "$status" -eq 0 ]
assert_success
}

@test "./include/vpopmail.sh" {
run ./include/vpopmail.sh
[ "$status" -eq 0 ]
assert_success
}
11 changes: 7 additions & 4 deletions test/mail-toaster.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ setup() {

@test "mt6_version_check" {
run mt6_version_check
[ "$status" -eq 0 ]
#[ "$status" -eq 0 ]
assert_success
}

@test "safe_jailname replaces . with _" {
run safe_jailname bad.chars
[ "$status" -eq 0 ]
[ "${lines[0]}" = "bad_chars" ]
assert_success
assert_output "bad_chars"
}

@test "reverse_list" {
run reverse_list tic tac toe
#echo "# $output" >&3
assert_success
assert_output --partial "toe tac tic"
}

@test "tell_status" {
run tell_status "BATS testing"
[ "$status" -eq 0 ]
assert_success
}

0 comments on commit 76eebb3

Please sign in to comment.