summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKerin Millar <kfm@plushkava.net>2024-08-10 06:59:00 +0100
committerSam James <sam@gentoo.org>2024-08-11 11:11:04 +0100
commit6ee0913b255b36c6fef503564bb26b56ee4c3268 (patch)
tree5564a5046e28e6ffac2a07f8a191dcaaf4c85335
parenttest-functions: comment as to why test_quote_args() fails for yash (diff)
downloadgentoo-functions-6ee0913b255b36c6fef503564bb26b56ee4c3268.tar.gz
gentoo-functions-6ee0913b255b36c6fef503564bb26b56ee4c3268.tar.bz2
gentoo-functions-6ee0913b255b36c6fef503564bb26b56ee4c3268.zip
test-functions: don't increment testnum by 2 for test_ebegin()
Also, restore the correct test_description string, which was being lost in a subshell. Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xtest-functions18
1 files changed, 10 insertions, 8 deletions
diff --git a/test-functions b/test-functions
index 28c72da..81593b8 100755
--- a/test-functions
+++ b/test-functions
@@ -109,14 +109,16 @@ test_die() {
test_ebegin() {
set -- eq 0
- callback() (
+ callback() {
test_description="ebegin message (expecting terminating newline)"
- _eprint() {
- shift
- _ends_with_newline "$*"
- }
- ebegin "message"
- )
+ (
+ _eprint() {
+ shift
+ _ends_with_newline "$*"
+ }
+ ebegin "message"
+ )
+ }
iterate_tests 2 "$@"
}
@@ -1200,7 +1202,7 @@ elif ! GENFUN_MODULES="portage rc" . ./functions.sh; then
else
assign_tmpdir
test_chdir || rc=1
- test_ebegin || rc=1; testnum=$((testnum + 1))
+ test_ebegin || rc=1
test_is_older_than || rc=1
test_get_bootparam || rc=1
test_esyslog || rc=1