diff options
author | Tor Lillqvist <tml@src.gnome.org> | 1999-07-31 21:45:21 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 1999-07-31 21:45:21 +0000 |
commit | 1146c6fbb37bb85f8c49f572cfae9469339f89ff (patch) | |
tree | dab4325dc6082366c991649a822998a36c0e0da2 /tests | |
parent | 87c7aeb93bd654776f59805a342ad913031034f3 (diff) | |
download | glib-1146c6fbb37bb85f8c49f572cfae9469339f89ff.tar.gz |
New functions.
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
* glib.h: Declare and document them. Define the deprecated
g_strescape as a macro that calls g_strecpy.
* tests/strfunc-test.c (main): Test them.
* makefile.{cygwin,msc}.in
* tests/makefile.{cygwin,msc}.in: Remove gstack and its test
program.
* glib.def: Additions and removals.
* README.win32: Improve gcc build instructions.
* build-dll: Also build import library for MSVC.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/makefile.cygwin.in | 3 | ||||
-rw-r--r-- | tests/makefile.msc.in | 3 | ||||
-rw-r--r-- | tests/strfunc-test.c | 11 |
3 files changed, 13 insertions, 4 deletions
diff --git a/tests/makefile.cygwin.in b/tests/makefile.cygwin.in index 9f02e154e..641b7ceb6 100644 --- a/tests/makefile.cygwin.in +++ b/tests/makefile.cygwin.in @@ -24,9 +24,8 @@ TESTS = \ rand-test.exe \ relation-test.exe\ slist-test.exe \ - stack-test.exe \ - string-test.exe \ strfunc-test.exe\ + string-test.exe \ thread-test.exe \ tree-test.exe \ type-test.exe diff --git a/tests/makefile.msc.in b/tests/makefile.msc.in index 1a91929f7..0cff24af6 100644 --- a/tests/makefile.msc.in +++ b/tests/makefile.msc.in @@ -26,9 +26,8 @@ TESTS = \ rand-test.exe \ relation-test.exe\ slist-test.exe \ - stack-test.exe \ - string-test.exe \ strfunc-test.exe\ + string-test.exe \ thread-test.exe \ tree-test.exe \ type-test.exe diff --git a/tests/strfunc-test.c b/tests/strfunc-test.c index f50a03716..16d5584cf 100644 --- a/tests/strfunc-test.c +++ b/tests/strfunc-test.c @@ -99,6 +99,17 @@ main (int argc, g_assert (strcmp(string, "00021 test ") == 0); g_free (string); + g_assert (strcmp(g_strccpy(g_malloc(100), + "abc\\\\\\\"\\b\\f\\n\\r\\t\\003\\177\\234\\313"), + "abc\\\"\b\f\n\r\t\003\177\234\313") == 0); + g_assert (strcmp(g_strecpy(g_malloc(100), + "abc\\\"\b\f\n\r\t\003\177\234\313", + NULL), + "abc\\\\\\\"\\b\\f\\n\\r\\t\\003\\177\\234\\313") == 0); + g_assert (strcmp(g_strecpy(g_malloc(100),"abc\\\"\b\f\n\r\t\003\177\234\313", + "\b\f\001\002\003\004"), + "abc\\\\\\\"\b\f\\n\\r\\t\003\\177\\234\\313") == 0); + return 0; } |