summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-06-12 12:37:46 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:10:39 +0200
commit0771e1276fa618b4ff3a65a7cd450f86b67a7829 (patch)
tree787049b88d16381e54d1c0906287f01b1886d36e /gettext-tools/tests
parenta9cbe6856958f5743d78a54a7c0f5322b6778df3 (diff)
downloadexternal_gettext-0771e1276fa618b4ff3a65a7cd450f86b67a7829.zip
external_gettext-0771e1276fa618b4ff3a65a7cd450f86b67a7829.tar.gz
external_gettext-0771e1276fa618b4ff3a65a7cd450f86b67a7829.tar.bz2
Tweaks.
Diffstat (limited to 'gettext-tools/tests')
-rw-r--r--gettext-tools/tests/Makefile.am4
-rwxr-xr-xgettext-tools/tests/format-perl-122
-rwxr-xr-xgettext-tools/tests/format-perl-216
3 files changed, 21 insertions, 21 deletions
diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am
index 4251cec..6b4d686 100644
--- a/gettext-tools/tests/Makefile.am
+++ b/gettext-tools/tests/Makefile.am
@@ -65,8 +65,8 @@ TESTS = gettext-1 gettext-2 \
plural-1 plural-2 \
lang-c lang-c++ lang-objc lang-python-1 lang-python-2 lang-clisp \
lang-elisp lang-librep lang-smalltalk lang-java lang-gawk lang-pascal \
- lang-ycp lang-tcl lang-php lang-po \
- lang-rst lang-perl
+ lang-ycp lang-tcl lang-perl lang-php lang-po \
+ lang-rst
EXTRA_DIST += $(TESTS) \
test.mo xg-test1.ok.po mex-test2.ok msguniq-a.in msguniq-a.inp \
diff --git a/gettext-tools/tests/format-perl-1 b/gettext-tools/tests/format-perl-1
index 1bbb5b8..801a5b5 100755
--- a/gettext-tools/tests/format-perl-1
+++ b/gettext-tools/tests/format-perl-1
@@ -5,8 +5,8 @@
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
-tmpfiles="$tmpfiles f-a-1.data"
-cat <<\EOF > f-a-1.data
+tmpfiles="$tmpfiles f-pl-1.data"
+cat <<\EOF > f-pl-1.data
# Valid: no argument
'abc%%'
# Valid: one character argument
@@ -132,21 +132,21 @@ n=0
while read comment; do
read string
n=`expr $n + 1`
- tmpfiles="$tmpfiles f-a-1-$n.in f-a-1-$n.po"
- cat <<EOF > f-a-1-$n.in
+ tmpfiles="$tmpfiles f-pl-1-$n.in f-pl-1-$n.po"
+ cat <<EOF > f-pl-1-$n.in
gettext(${string});
EOF
- ${XGETTEXT} -L perl -o f-a-1-$n.po f-a-1-$n.in || exit 1
- test -f f-a-1-$n.po || exit 1
+ ${XGETTEXT} -L perl -o f-pl-1-$n.po f-pl-1-$n.in || exit 1
+ test -f f-pl-1-$n.po || exit 1
fail=
if echo "$comment" | grep 'Valid:' > /dev/null; then
- if grep perl-format f-a-1-$n.po > /dev/null; then
+ if grep perl-format f-pl-1-$n.po > /dev/null; then
:
else
fail=yes
fi
else
- if grep perl-format f-a-1-$n.po > /dev/null; then
+ if grep perl-format f-pl-1-$n.po > /dev/null; then
fail=yes
else
:
@@ -154,12 +154,12 @@ EOF
fi
if test -n "$fail"; then
echo "Format string recognition error:" 1>&2
- cat f-a-1-$n.in 1>&2
+ cat f-pl-1-$n.in 1>&2
echo "Got:" 1>&2
- cat f-a-1-$n.po 1>&2
+ cat f-pl-1-$n.po 1>&2
exit 1
fi
-done < f-a-1.data
+done < f-pl-1.data
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/format-perl-2 b/gettext-tools/tests/format-perl-2
index a8b6644..929628a 100755
--- a/gettext-tools/tests/format-perl-2
+++ b/gettext-tools/tests/format-perl-2
@@ -5,8 +5,8 @@
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
-tmpfiles="$tmpfiles f-a-2.data"
-cat <<\EOF > f-a-2.data
+tmpfiles="$tmpfiles f-pl-2.data"
+cat <<\EOF > f-pl-2.data
# Valid: %% doesn't count
msgid "abc%%def"
msgstr "xyz"
@@ -126,21 +126,21 @@ while read comment; do
read msgid_line
read msgstr_line
n=`expr $n + 1`
- tmpfiles="$tmpfiles f-a-2-$n.po f-a-2-$n.mo"
- cat <<EOF > f-a-2-$n.po
+ tmpfiles="$tmpfiles f-pl-2-$n.po f-pl-2-$n.mo"
+ cat <<EOF > f-pl-2-$n.po
#, perl-format
${msgid_line}
${msgstr_line}
EOF
fail=
if echo "$comment" | grep 'Valid:' > /dev/null; then
- if ${MSGFMT} --check-format -o f-a-2-$n.mo f-a-2-$n.po; then
+ if ${MSGFMT} --check-format -o f-pl-2-$n.mo f-pl-2-$n.po; then
:
else
fail=yes
fi
else
- ${MSGFMT} --check-format -o f-a-2-$n.mo f-a-2-$n.po 2> /dev/null
+ ${MSGFMT} --check-format -o f-pl-2-$n.mo f-pl-2-$n.po 2> /dev/null
if test $? = 1; then
:
else
@@ -149,10 +149,10 @@ EOF
fi
if test -n "$fail"; then
echo "Format string checking error:" 1>&2
- cat f-a-2-$n.po 1>&2
+ cat f-pl-2-$n.po 1>&2
exit 1
fi
-done < f-a-2.data
+done < f-pl-2.data
rm -fr $tmpfiles