Skip to content

Commit

Permalink
empty: Handle errx() difference on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
jperkin committed Dec 13, 2024
1 parent e0ffe33 commit 319ca16
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions suite/empty.bats
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,8 @@ fi
for cmd in remove rm; do
run pkgin ${yflag} ${cmd} pkg-does-not-exist
[ ${status} -eq 1 ]
if [ ${PKGIN_VERSION} -lt 001000 ]; then
output_match "pkgin.*: empty local package list."
else
[ "${output}" = "pkgin: empty local package list." ]
fi
# Apparently errx() on Linux ignores setprogname()
output_match "empty local package list"
done
}
@test "${SUITE} test pkgin autoremove" {
Expand Down Expand Up @@ -217,11 +214,8 @@ fi
for cmd in export ex; do
run pkgin ${yflag} ${cmd}
[ ${status} -eq 1 ]
if [ ${PKGIN_VERSION} -lt 001000 ]; then
output_match "pkgin.*: empty local package list."
else
[ "${output}" = "pkgin: empty local package list." ]
fi
# Apparently errx() on Linux ignores setprogname()
output_match "empty local package list"
done
}
@test "${SUITE} test pkgin show-category" {
Expand Down Expand Up @@ -256,11 +250,8 @@ fi
for cmd in pkg-content pc pkg-descr pd pkg-build-defs pbd; do
run pkgin ${yflag} ${cmd}
[ ${status} -eq 1 ]
if [ ${PKGIN_VERSION} -lt 001000 ]; then
output_match "pkgin.*: missing package name"
else
[ "${output}" = "pkgin: missing package name" ]
fi
# Apparently errx() on Linux ignores setprogname()
output_match "missing package name"
done
}
@test "${SUITE} test pkgin pkg-* commands (missing package)" {
Expand Down

0 comments on commit 319ca16

Please sign in to comment.