From 46e8f5c6adbc6797b07ce4d07ec17c2fde036170 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 13 Oct 2024 20:49:01 +0200 Subject: [PATCH] tests: Make it easier to single-step the msgfmt-* tests. * gettext-tools/tests/msgfmt-desktop-1: Assign a default to MSGFMT. * gettext-tools/tests/msgfmt-desktop-2: Likewise. * gettext-tools/tests/msgfmt-desktop-3: Likewise. * gettext-tools/tests/msgfmt-xml-1: Likewise. * gettext-tools/tests/msgfmt-xml-2: Likewise. * gettext-tools/tests/msgfmt-xml-3: Likewise. * gettext-tools/tests/msgfmt-xml-4: Likewise. * gettext-tools/tests/msgfmt-xml-5: Likewise. --- gettext-tools/tests/msgfmt-desktop-1 | 2 ++ gettext-tools/tests/msgfmt-desktop-2 | 2 ++ gettext-tools/tests/msgfmt-desktop-3 | 1 + gettext-tools/tests/msgfmt-xml-1 | 2 ++ gettext-tools/tests/msgfmt-xml-2 | 2 ++ gettext-tools/tests/msgfmt-xml-3 | 1 + gettext-tools/tests/msgfmt-xml-4 | 2 ++ gettext-tools/tests/msgfmt-xml-5 | 1 + 8 files changed, 13 insertions(+) diff --git a/gettext-tools/tests/msgfmt-desktop-1 b/gettext-tools/tests/msgfmt-desktop-1 index a1c71fb18..548ef52d4 100755 --- a/gettext-tools/tests/msgfmt-desktop-1 +++ b/gettext-tools/tests/msgfmt-desktop-1 @@ -67,6 +67,8 @@ Categories= NoDisplay=true EOF +: ${MSGFMT=msgfmt} + # Sanity checks for contradicting options. ${MSGFMT} --desktop --template=mf.desktop -l fr fr.po \ diff --git a/gettext-tools/tests/msgfmt-desktop-2 b/gettext-tools/tests/msgfmt-desktop-2 index d131980d8..f8cff377a 100755 --- a/gettext-tools/tests/msgfmt-desktop-2 +++ b/gettext-tools/tests/msgfmt-desktop-2 @@ -127,6 +127,8 @@ EOF unset LINGUAS +: ${MSGFMT=msgfmt} + # Sanity checks for contradicting options. ${MSGFMT} --desktop --template=mf.desktop -d po -o mf.desktop.out \ diff --git a/gettext-tools/tests/msgfmt-desktop-3 b/gettext-tools/tests/msgfmt-desktop-3 index 149d9c203..52e07f18d 100755 --- a/gettext-tools/tests/msgfmt-desktop-3 +++ b/gettext-tools/tests/msgfmt-desktop-3 @@ -59,6 +59,7 @@ EOF # Generate the merged .desktop file. +: ${MSGFMT=msgfmt} ${MSGFMT} --desktop --template=hello.desktop -l th th.po -o hello.desktop.tmp \ || Exit 1 LC_ALL=C tr -d '\r' < hello.desktop.tmp > hello.desktop.out || Exit 1 diff --git a/gettext-tools/tests/msgfmt-xml-1 b/gettext-tools/tests/msgfmt-xml-1 index f4911ad0b..453175d88 100755 --- a/gettext-tools/tests/msgfmt-xml-1 +++ b/gettext-tools/tests/msgfmt-xml-1 @@ -138,6 +138,8 @@ cat <<\EOF > mf.appdata.xml.ok EOF +: ${MSGFMT=msgfmt} + # Sanity checks for contradicting options. ${MSGFMT} --xml --template=mf.appdata.xml -l fr fr.po \ diff --git a/gettext-tools/tests/msgfmt-xml-2 b/gettext-tools/tests/msgfmt-xml-2 index d75b24c02..58caa2868 100755 --- a/gettext-tools/tests/msgfmt-xml-2 +++ b/gettext-tools/tests/msgfmt-xml-2 @@ -247,6 +247,8 @@ EOF unset LINGUAS +: ${MSGFMT=msgfmt} + # Sanity checks for contradicting options. ${MSGFMT} --xml --template=mf.appdata.xml -d po -o mf.appdata.xml.out \ diff --git a/gettext-tools/tests/msgfmt-xml-3 b/gettext-tools/tests/msgfmt-xml-3 index 3a13bda67..14bf5d428 100755 --- a/gettext-tools/tests/msgfmt-xml-3 +++ b/gettext-tools/tests/msgfmt-xml-3 @@ -214,6 +214,7 @@ EOF unset LINGUAS +: ${MSGFMT=msgfmt} ${MSGFMT} --xml --template=mf.appdata.xml -d po -o mf.appdata.xml.out || Exit 1 : ${DIFF=diff} diff --git a/gettext-tools/tests/msgfmt-xml-4 b/gettext-tools/tests/msgfmt-xml-4 index b83a8937a..4896931b0 100755 --- a/gettext-tools/tests/msgfmt-xml-4 +++ b/gettext-tools/tests/msgfmt-xml-4 @@ -124,6 +124,8 @@ cat <<\EOF > mf.appdata.xml.ok EOF +: ${MSGFMT=msgfmt} + # Sanity checks for contradicting options. ${MSGFMT} --replace-text fr.po \ diff --git a/gettext-tools/tests/msgfmt-xml-5 b/gettext-tools/tests/msgfmt-xml-5 index 156c573f7..a12b97ab8 100755 --- a/gettext-tools/tests/msgfmt-xml-5 +++ b/gettext-tools/tests/msgfmt-xml-5 @@ -129,6 +129,7 @@ cat <<\EOF > activipy_tester.de.xml.ok EOF +: ${MSGFMT=msgfmt} ${MSGFMT} --xml --template=activipy_tester.xml --replace-text -l de de.po -o activipy_tester.de.xml \ || Exit 1 -- 2.47.3