summaryrefslogtreecommitdiff
path: root/test/cases/librelib.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/cases/librelib.bats')
-rw-r--r--test/cases/librelib.bats17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/cases/librelib.bats b/test/cases/librelib.bats
index ebaf7b2..1bd80ae 100644
--- a/test/cases/librelib.bats
+++ b/test/cases/librelib.bats
@@ -1,9 +1,6 @@
-#!/usr/bin/env roundup
+load ../lib/common
-describe librelib
-. ./test-common.sh
-
-it_displays_help_and_fails_with_0_args() {
+@test "librelib displays help and fails with 0 args" {
librelib >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
empty $tmpdir/stdout
@@ -11,7 +8,7 @@ it_displays_help_and_fails_with_0_args() {
[[ $status != 0 ]]
}
-it_fails_with_2_args() {
+@test "librelib fails with 2 args" {
librelib a b >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
empty $tmpdir/stdout
@@ -19,7 +16,7 @@ it_fails_with_2_args() {
[[ $status != 0 ]]
}
-it_displays_usage_text() {
+@test "librelib displays usage text" {
librelib -h >$tmpdir/stdout 2>$tmpdir/stderr
[[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]]
@@ -29,7 +26,7 @@ it_displays_usage_text() {
# Nothing in $(libdir) should be executable anymore (except that
# $(libexecdir)=$(libdir), and executable things go in there. But I
# digress, libremessages should not be executable anymore).
-it_finds_messages() {
+@test "librelib finds messages" {
v1=$(librelib messages)
v2=$(librelib libremessages)
v3=$(librelib messages.sh)
@@ -42,7 +39,7 @@ it_finds_messages() {
}
# conf.sh is non-executable
-it_finds_conf() {
+@test "librelib finds conf" {
v1=$(librelib conf)
v2=$(librelib libreconf)
v3=$(librelib conf.sh)
@@ -54,7 +51,7 @@ it_finds_conf() {
[[ "$v1" == "$v4" ]]
}
-it_fails_to_find_phony() {
+@test "librelib fails to find phony" {
librelib phony >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
empty $tmpdir/stdout