]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix failure of lang-javascript on Ubuntu 16.04.
authorBruno Haible <bruno@clisp.org>
Fri, 5 Jan 2018 22:14:21 +0000 (23:14 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 5 Jan 2018 22:14:21 +0000 (23:14 +0100)
pkg-config almost never works. It is best to never use it.

* gettext-tools/tests/lang-javascript: Don't use pkg-config to test whether
the installed gjs is appropriate.

gettext-tools/tests/lang-javascript

index bbed1407707868d933eebf1d6b7295015a50a5da..5ef33bbf3fee0c20a201bf60d7f14921cc7177b9 100755 (executable)
@@ -66,9 +66,10 @@ ${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
 (gjs -c imports.gettext) >/dev/null 2>/dev/null \
   || { echo "Skipping test: gjs gettext module not found"; Exit 77; }
 (gjs -c imports.format) >/dev/null 2>/dev/null \
-    || { echo "Skipping test: gjs format module not found"; Exit 77; }
-(pkg-config gjs-1.0 --atleast-version=1.40) >/dev/null 2>/dev/null \
-    || { echo "Skipping test: gjs version is older than 1.40"; Exit 77; }
+  || { echo "Skipping test: gjs format module not found"; Exit 77; }
+# Test for presence of gjs version 1.40 or newer.
+(gjs -c 'print(imports.format.vprintf("%3$s%2$s%1$s", ["x","y","z"]))') 2>/dev/null | grep zyx >/dev/null \
+  || { echo "Skipping test: gjs version is older than 1.40"; Exit 77; }
 
 # Test which of the fr_FR locales are installed.
 : ${LOCALE_FR=fr_FR}