From 409958feaa842972eefd261b2fa1182c13657be6 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 11 Sep 2013 23:21:36 +0300 Subject: Basic test case for gettext. --- test cases/frameworks/6 gettext/po/meson.build | 0 test cases/frameworks/6 gettext/src/intlmain.c | 19 +++++++++++++++++++ test cases/frameworks/6 gettext/src/meson.build | 1 + 3 files changed, 20 insertions(+) create mode 100644 test cases/frameworks/6 gettext/po/meson.build create mode 100644 test cases/frameworks/6 gettext/src/intlmain.c create mode 100644 test cases/frameworks/6 gettext/src/meson.build (limited to 'test cases') 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 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 +#include +#include + +#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') -- cgit v1.1