projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i18n: New function recode_string_len().
[pspp-builds.git]
/
tests
/
libpspp
/
i18n-test.c
diff --git
a/tests/libpspp/i18n-test.c
b/tests/libpspp/i18n-test.c
index f2bead96f78e6bd1412e2bc925c4bbbf43407b9d..03b96f2e431ba9a4ad993cc7dc93856afdd743af 100644
(file)
--- a/
tests/libpspp/i18n-test.c
+++ b/
tests/libpspp/i18n-test.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010
, 2011
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-18,9
+18,13
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "libpspp/i18n.h"
#include "libpspp/i18n.h"
+#undef NDEBUG
+#include <assert.h>
+
int
main (int argc, char *argv[])
{
int
main (int argc, char *argv[])
{
@@
-40,6
+44,7
@@
main (int argc, char *argv[])
i18n_init ();
s = recode_string (argv[2], argv[1], argv[3], -1);
puts (s);
i18n_init ();
s = recode_string (argv[2], argv[1], argv[3], -1);
puts (s);
+ assert (strlen (s) == recode_string_len (argv[2], argv[1], argv[3], -1));
free (s);
return 0;
free (s);
return 0;