From 53595938d003411e6992e10b6a5c5e51b2a15d4f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 16 May 2006 00:46:03 +0000 Subject: add new test programme utf8-test.c git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@880 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/tests/utf8-test.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/tests/utf8-test.c (limited to 'src/tests/utf8-test.c') diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c new file mode 100644 index 00000000..c8b2fabb --- /dev/null +++ b/src/tests/utf8-test.c @@ -0,0 +1,26 @@ +/* $Id$ */ + +#include +#include + +#include +#include + +int main(int argc, char *argv[]) { + char *c; + + assert(pa_utf8_valid("hallo")); + assert(pa_utf8_valid("hallo\n")); + assert(!pa_utf8_valid("hüpfburg\n")); + assert(pa_utf8_valid("hallo\n")); + assert(pa_utf8_valid("hüpfburg\n")); + + printf("LATIN1: %s\n", c = pa_utf8_filter("hüpfburg")); + pa_xfree(c); + printf("UTF8: %sx\n", c = pa_utf8_filter("hüpfburg")); + pa_xfree(c); + printf("LATIN1: %sx\n", c = pa_utf8_filter("üxknärzmörzeltörszß³§dsjkfh")); + pa_xfree(c); + + return 0; +} -- cgit From d9cc2cfcb97c1b0449bcbfb6ab0301a58d77bd55 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 17 May 2006 16:34:18 +0000 Subject: Move xmalloc to the public side (libpolyp). git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@908 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/tests/utf8-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/utf8-test.c') diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c index c8b2fabb..57f445c7 100644 --- a/src/tests/utf8-test.c +++ b/src/tests/utf8-test.c @@ -3,8 +3,8 @@ #include #include +#include #include -#include int main(int argc, char *argv[]) { char *c; -- cgit From 7ca25e58e99abb3d640b6012d7cbfc9bc9087849 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 17 May 2006 17:30:49 +0000 Subject: Move utf8 to the public part (libpolyp). git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@909 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/tests/utf8-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/utf8-test.c') diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c index 57f445c7..2c21613e 100644 --- a/src/tests/utf8-test.c +++ b/src/tests/utf8-test.c @@ -3,8 +3,8 @@ #include #include +#include #include -#include int main(int argc, char *argv[]) { char *c; -- cgit From f44ba092651aa75055e109e04b4164ea92ae7fdc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 19 Jun 2006 21:53:48 +0000 Subject: big s/polyp/pulse/g git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/tests/utf8-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests/utf8-test.c') diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c index 2c21613e..2e9f128a 100644 --- a/src/tests/utf8-test.c +++ b/src/tests/utf8-test.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include int main(int argc, char *argv[]) { char *c; -- cgit From 521daf6f0ac4fa6a2fbfb5d523c0c743342dca2b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 4 Jan 2007 13:43:45 +0000 Subject: Huge trailing whitespace cleanup. Let's keep the tree pure from here on, mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/tests/utf8-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests/utf8-test.c') diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c index 2e9f128a..b9594dcc 100644 --- a/src/tests/utf8-test.c +++ b/src/tests/utf8-test.c @@ -8,13 +8,13 @@ int main(int argc, char *argv[]) { char *c; - + assert(pa_utf8_valid("hallo")); assert(pa_utf8_valid("hallo\n")); assert(!pa_utf8_valid("hüpfburg\n")); assert(pa_utf8_valid("hallo\n")); assert(pa_utf8_valid("hüpfburg\n")); - + printf("LATIN1: %s\n", c = pa_utf8_filter("hüpfburg")); pa_xfree(c); printf("UTF8: %sx\n", c = pa_utf8_filter("hüpfburg")); -- cgit