]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
tests: Avoid a lang-modula2 failure.
authorBruno Haible <bruno@clisp.org>
Mon, 5 May 2025 10:24:52 +0000 (12:24 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 5 May 2025 10:26:23 +0000 (12:26 +0200)
* gettext-tools/tests/lang-modula2: Skip the test if gm2 is not working.

gettext-tools/tests/lang-modula2

index b627b7616552a35c32a3ea885bb009957081a9a2..dbdfb9e4aca52193d85e67dcfa3474654c122495 100644 (file)
@@ -5,10 +5,6 @@
 # Assumes an fr_FR locale is installed.
 # Assumes the following packages are installed: gm2.
 
-# Note: This test fails on Ubuntu 22.04, with a compilation error
-# "error: the file containing the definition module 'Terminal' cannot be found",
-# apparently due to insufficient include paths in this version of gm2.
-
 # Test whether we can build and test Modula-2 programs.
 test "${MODULA2_CHOICE}" != no || {
   echo "Skipping test: configured with --disable-modula2"
@@ -19,6 +15,21 @@ test "${BUILDMODULA2}" = yes || {
   Exit 77
 }
 
+# On Ubuntu 22.04, with gm2 version 11, we see a compilation error
+# "error: the file containing the definition module 'Terminal' cannot be found",
+# apparently due to insufficient include paths in this version of gm2.
+cat <<\EOF > foo.mod
+MODULE Prog;
+FROM Terminal IMPORT WriteLn;
+BEGIN
+  WriteLn;
+END Prog.
+EOF
+${M2C} ${M2FLAGS} -o foo foo.mod || {
+  echo "Skipping test: Modula-2 compiler cannot find module 'Terminal'"
+  Exit 77
+}
+
 cat <<\EOF > prog.mod
 MODULE Prog;