Basic test case for gettext.

pull/15/head
Jussi Pakkanen 12 years ago
parent 2fe88bebd8
commit 409958feaa
  1. 0
      test cases/frameworks/6 gettext/po/meson.build
  2. 19
      test cases/frameworks/6 gettext/src/intlmain.c
  3. 1
      test cases/frameworks/6 gettext/src/meson.build

@ -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;
}

@ -0,0 +1 @@
executable('intlprog', 'intlmain.c')
Loading…
Cancel
Save