diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-11 23:21:36 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-11 23:21:36 +0300 |
commit | 409958feaa842972eefd261b2fa1182c13657be6 (patch) | |
tree | 0d714f0ef08287a0071a6ce46967836d1b07834e /test cases | |
parent | 2fe88bebd89b95272f753477831cf2c6b9172516 (diff) | |
download | meson-409958feaa842972eefd261b2fa1182c13657be6.zip meson-409958feaa842972eefd261b2fa1182c13657be6.tar.gz meson-409958feaa842972eefd261b2fa1182c13657be6.tar.bz2 |
Basic test case for gettext.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/frameworks/6 gettext/po/meson.build | 0 | ||||
-rw-r--r-- | test cases/frameworks/6 gettext/src/intlmain.c | 19 | ||||
-rw-r--r-- | test cases/frameworks/6 gettext/src/meson.build | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/test cases/frameworks/6 gettext/po/meson.build b/test cases/frameworks/6 gettext/po/meson.build new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/meson.build diff --git a/test cases/frameworks/6 gettext/src/intlmain.c b/test cases/frameworks/6 gettext/src/intlmain.c new file mode 100644 index 0000000..ba5011b --- /dev/null +++ b/test cases/frameworks/6 gettext/src/intlmain.c @@ -0,0 +1,19 @@ +#include<libintl.h> +#include<locale.h> +#include<stdio.h> + +#define _(String) gettext (String) +#define gettext_noop(String) String +#define N_(String) gettext_noop (String) + +#define PACKAGE "intltest" +// WRONG, but enough for this test. +#define LOCALEDIR "/usr/share/locale" + +int main(int argc, char **argv) { + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + printf("%s\n", _("International greeting.")); + return 0; +} diff --git a/test cases/frameworks/6 gettext/src/meson.build b/test cases/frameworks/6 gettext/src/meson.build new file mode 100644 index 0000000..c53f566 --- /dev/null +++ b/test cases/frameworks/6 gettext/src/meson.build @@ -0,0 +1 @@ +executable('intlprog', 'intlmain.c') |