summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/test-lib-functions.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 92ed029371..64f793e3d7 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -719,6 +719,18 @@ test_i18ncmp () {
# under GETTEXT_POISON this pretends that the command produced expected
# results.
test_i18ngrep () {
+ eval "last_arg=\${$#}"
+
+ test -f "$last_arg" ||
+ error "bug in the test script: test_i18ngrep requires a file" \
+ "to read as the last parameter"
+
+ if test $# -lt 2 ||
+ { test "x!" = "x$1" && test $# -lt 3 ; }
+ then
+ error "bug in the test script: too few parameters to test_i18ngrep"
+ fi
+
if test -n "$GETTEXT_POISON"
then
: # pretend success