summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2002-12-12Add a test for positional parameters in g_snprintf(). Use g_printf()Matthias Clasen1-0/+5
* tests/string-test.c: Add a test for positional parameters in g_snprintf(). * glib-genmarshal.c, gobject-query.c: Use g_printf() instead of system printf. (#99319)
2002-12-12pull in trio if host printf doesn't have a known way of printing 64-bitManish Singh2-16/+1
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org> * configure.in: pull in trio if host printf doesn't have a known way of printing 64-bit ints. * glib/gmacros.h: remove extra whitespace at the end * glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT instead of hardcoding "%llu" * tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64, we always have it now. * tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as well.
2002-12-06Avoid literal UTF-8. (Allow it to build with IRIX cc, #72757, Tomas Ogren)Owen Taylor1-13/+13
Fri Dec 6 14:34:42 2002 Owen Taylor <otaylor@redhat.com> Avoid literal UTF-8. (Allow it to build with IRIX cc, #72757, Tomas Ogren) * tests/patterntest.c (main): Convert literal iso-8859-1 high bit characters in tests to string escapes. * glib/gunichartable.h glib/gen-unicode-tables.pl: Use hex \xMN escapes rather than literal UTF-8 for casefold tables. * configure.in: AC_PREREQ(2.53). needed for recent GLIB_SIZEOF() changes.
2002-11-26Avoid non-ANSI pointer comparison. (#54344, Morten Welinder)Owen Taylor1-0/+23
Tue Nov 26 09:51:43 2002 Owen Taylor <otaylor@redhat.com> * glib/gstrfuncs.c (g_strchomp): Avoid non-ANSI pointer comparison. (#54344, Morten Welinder) * tests/strfunc-test.c (main): Add tests for strchomp().
2002-11-26Improved the seeding algorithm. Old behaviour can be achived by settingSebastian Wilhelmi1-20/+20
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c: Improved the seeding algorithm. Old behaviour can be achived by setting envvar G_RANDOM_VERSION to "2.0". (#99262) * docs/reference/glib/glib-docs.sgml, docs/reference/glib/Makefile.am: Renamed docs/reference/glib/changes-2.0.sgml to docs/reference/glib/changes.sgml and added section for changes from 2.0 to 2.2 (Also corrected 1.0 to 1.2). * README.in, docs/reference/glib/running.sgml, docs/reference/glib/tmpl/random_numbers.sgml, docs/reference/glib/changes.sgml: Added notes about the new seeding algorithm.
2002-11-17Ignore the G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfullyTor Lillqvist3-1/+253
2002-11-17 Tor Lillqvist <tml@iki.fi> * glib/gspawn-win32.c (g_spawn_async_with_pipes): Ignore the G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully implemented on Windows, at least not now. Always pass dont_wait as TRUE to do_spawn_with_pipes(). The semantics of the dont_wait parameter is very different from the semantics of the intermediate_child parameter to fork_exec_with_pipes() in the Unix version. This fixes a serious bug, g_spawn_async() in fact behaved synchronously. (do_spawn_with_pipes, do_spawn): Rename from fork_exec_with_pipes() and do_exec(), those names were from the Unix bersion, and misleading. (close_and_invalidate): Don't try to close invalid fds. * glib/gspawn.c (g_spawn_async_with_pipes): Add warning about Windows behaviour. There is no fork(), so the child_setup() function is in fact called in the parent. * glib/gspawn-win32-helper.c (WinMain): Insert spaces in argv debugging output. * tests/spawn-test-win32-gui.c: New file. Test program to be linked as a GUI application. Behaves differently depending on how invoked (by spawn-test). * tests/spawn-test.c (run_tests): On Win32, run the spawn-test-win32-gui program, too, in several ways, synchronously and asynchronously. * tests/Makefile.am: Corresponding change.
2002-11-04Include config.h so DISABLE_MEMPOOLS actually has an effect. (#96437,Owen Taylor1-0/+2
Mon Nov 4 14:41:48 2002 Owen Taylor <otaylor@redhat.com> * glib/gbsearcharray.c: Include config.h so DISABLE_MEMPOOLS actually has an effect. (#96437, Morten Welinder) * tests/uri-test.c: Include <config.h> Mon Nov 4 14:42:36 2002 Owen Taylor <otaylor@redhat.com> * gtype.c gsignal.c gvaluearray.c: Include config.h so DISABLE_MEMPOOLS actually has an effect. (#96437, Morten Welinder) * gsignal.c: Conditionalize definition of g_handler_ts on DISABLE_MEM_POOLS (#96437) Mon Nov 4 14:45:24 2002 Owen Taylor <otaylor@redhat.com> * gthread-posix.c gthread-solaris.c: Include <config.h>
2002-10-15use gsize instead of int where appropriate (64-bit cleanliness fix).Manish Singh1-4/+5
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org> * tests/iochannel-test.c: use gsize instead of int where appropriate (64-bit cleanliness fix). Removed leftover line_term cruft.
2002-10-15add -DG_DISABLED_DEPRECATEDManish Singh7-39/+37
Tue Oct 15 15:07:45 2002 Manish Singh <yosh@gimp.org> * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: add -DG_DISABLED_DEPRECATED * tests/gio-test.c tests/mainloop-test.c tests/string-test.c tests/testglib.c test/tree-test.c tests/unicode-collate.c tests/unicode-normalize.c: Deprecation cleanup
2002-10-14Fix a minor memory leak.Owen Taylor1-0/+2
Mon Oct 14 15:32:14 2002 Owen Taylor <otaylor@redhat.com> * tests/mainloop-test.c (adder_response): Fix a minor memory leak.
2002-09-29use gsize instead of int where appropriate (64-bit cleanliness fix)Manish Singh1-6/+6
Sun Sep 29 12:15:44 2002 Manish Singh <yosh@gimp.org> * tests/mainloop-test.c: use gsize instead of int where appropriate (64-bit cleanliness fix)
2002-07-26hu Jul 25 14:23:15 2002 Owen Taylor <otaylor@redhat.com>Owen Taylor1-1/+37
* glib/gfileutils.c: Clarify the behavior of g_build_path() for empty elements and for leading and trailing copies of the separator in the docs. * glib/gfileutils.c: Fix problems with leading elements consisting only of "/" characters. (#85928, Guillaume Chazarain) * tests/strfunc-test.c (main): Add more test cases for g_build_filename().
2002-07-04Added #undef G_DISABLE_ASSERT and #undef G_LOG_DOMAIN throughout theSebastian Wilhelmi25-0/+73
2002-07-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * tests/*.c: Added #undef G_DISABLE_ASSERT and #undef G_LOG_DOMAIN throughout the files, which didn't already have them. (#87312)
2002-06-11tests/patterntest.c (test_compilation) A couple of 64-bit printf formatOwen Taylor1-1/+1
Tue Jun 11 17:03:39 2002 Owen Taylor <otaylor@redhat.com> * tests/patterntest.c (test_compilation) * glib/gmem.c (profiler_try_realloc): A couple of 64-bit printf format fix from George Lebl. * glib/gconvert.c (open_converter): Fix gsize/gint mixup for g_iconv() arguments.
2002-05-18New testcases.Matthias Clasen8-2/+16
2002-05-18 Matthias Clasen <maclas@gmx.de> * tests/markups/fail-36.gmarkup: * tests/markups/fail-35.gmarkup: * tests/markups/valid-8.gmarkup: * tests/markups/valid-7.gmarkup: * tests/markups/valid-6.gmarkup: * tests/markups/valid-5.gmarkup: New testcases. * tests/markup-test.c (passthrough_handler): (text_handler): Don't ignore the text_len parameter. * glib/gmarkup.c (find_current_text_end): Don't hang on embedded nuls. (#81977) (g_markup_parse_context_parse): Fix passthrough handling to correctly skip processing instructions, comments, doctype declarations and CDATA marked sections. (#81977)
2002-05-14New functions g_str_has_suffix and g_str_has_prefix.Alex Larsson1-0/+16
2002-05-14 Alex Larsson <alexl@redhat.com> * glib/gstrfuncs.c: * glib/gstrfuncs.h: New functions g_str_has_suffix and g_str_has_prefix. * tests/string-test.c: (main): Test the new functions.
2002-05-07Fixes for #79347, Ron Arts.Owen Taylor1-0/+3
Tue May 7 11:24:22 2002 Owen Taylor <otaylor@redhat.com> Fixes for #79347, Ron Arts. * glib/gqsort.c (g_qsort_with_data): Handle 0 elements, don't g_return_if_fail(). * tests/qsort-test.c (main): Add a 0 element test. * glib/garray.c (g_[ptr_]array_sort_with[_data]): Remove invalid assertions that array->pdata != NULL .. it's NULL for 0 elements which is a valid case.
2002-04-10Remove manual UTF-8 -> Latin1 conversion for stuff fed to g_print.Matthias Clasen1-3/+4
* tests/patterntest.c: Remove manual UTF-8 -> Latin1 conversion for stuff fed to g_print.
2002-04-08Use gsize instead of gint. From Miroslaw Dobrzanski-NeumannSebastian Wilhelmi2-2/+2
2002-04-08 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * tests/gio-test.c, tests/markup-test.c: Use gsize instead of gint. From Miroslaw Dobrzanski-Neumann <mne@mosaic-ag.com>. (#77982)
2002-03-28Remove warning about g_print, etc, encoding.Owen Taylor1-1/+3
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com> * README: Remove warning about g_print, etc, encoding. * NEWS: Updates. * glib/gmessages.c (g_log_default_handler): Use %lu (plus a cast) when printing out pid_t arguments. (#76770, Morten Welinder) * glib/gstrfuncs.c (g_strdup_vprintf): Check the result of vasprintf(), return NULL on failure. (#76802, Akira Tagoh) * tests/testglib.c (TEST): Supress a warning with some GCC versions.
2002-03-05Default to --disable-gtk-doc, to avoid Jade setup hassles.Owen Taylor2-10/+10
Sun Mar 3 21:09:24 2002 Owen Taylor <otaylor@redhat.com> * configure.in: Default to --disable-gtk-doc, to avoid Jade setup hassles. * autogen.sh: Add --enable-gtk-doc. * configure.in: Default to --disable-static to go along with Pango, GTK+ where we need to do that for bin-compat reasons. * Makefile.am: Add a slightly modified distcheck rule that passes --enable-gtk-doc to the configure inside. (So that 'make dist' succeeds inside.) * configure.in *.pc.in **/Makefile.am m4macros/glib-2.0.m4 tests/makefile.mingw.in: Switch everything over to glib-2.0.
2002-02-21ed Feb 20 22:35:42 2002 Owen Taylor <otaylor@redhat.com>Owen Taylor1-0/+7
Fixes from Miroslaw Dobrzanski-Neumann (#71963) * glib/giounix.c (g_io_channel_new_file): Fix trailing comma in enum. * configure.in: Check for unsetenv. * test/uri-test.c: Fall back to trying putenv(VARNAME) if unsetenv isn't present.
2002-02-15Do not assume, that after g_usleep(G_USEC_PER_SEC) the newly startedSebastian Wilhelmi1-7/+25
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * tests/thread-test.c: Do not assume, that after g_usleep(G_USEC_PER_SEC) the newly started thread began running. Spotted by Miroslaw Dobrzanski-Neumann <mne@mosaic-ag.com>. Make the test_g_static_rw_lock_thread threads wait a random time. Make the test_g_static_rw_lock test run 5 seconds, not 1.
2002-02-10no sym links on win32, no lstat in msvcrtHans Breuer1-1/+2
2002-02-10 Hans Breuer <hans@breuer.org> * glib/gfileutils.c : no sym links on win32, no lstat in msvcrt * tests/makefile.msc.in : added uri-test
2002-02-09Test attribute value delimiters.Matthias Clasen1-0/+8
* tests/markups/valid-4.gmarkup: Test attribute value delimiters. * glib/gmarkup.c (g_markup_parse_context_parse): Support ' and " as attribute value delimiters. (#70677)
2002-02-08Make hostname parameter const char *. Added a new "ASCII must not beDarin Adler1-21/+23
* glib/gconvert.h: Make hostname parameter const char *. * glib/gconvert.c: (g_unescape_uri_string): Added a new "ASCII must not be escaped" feature, and some missing error checking. (is_escalphanum): New. (is_escalpha): New. (hostname_validate): New. (g_filename_from_uri): Don't allow hostnames to include escaped ASCII, validate hostnames with the new hostname_validate. (g_filename_to_uri): Validate hostnames with the new hostname_validate. * tests/uri-test.c: Updated tests to reflect the hostname validation changes above. * glib/gdate.c: (g_date_fill_parse_tokens): Remove the <ctype.h> include and do isdigit -> g_ascii_isdigit.
2002-02-08Fix access to freed memory in test case (Miroslaw Dobrzanski-Neumann).Owen Taylor1-6/+4
Fri Feb 8 12:32:14 2002 Owen Taylor <otaylor@redhat.com> * tests/hash-test.c (second_hash_test): Fix access to freed memory in test case (Miroslaw Dobrzanski-Neumann). Re-enable and debug some commented out code.
2002-01-291.3.13GLIB_1_3_13Owen Taylor1-6/+12
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com> * 1.3.13 * tests/shell-test.c: Workaround for MSVC bugs. (#61064)
2002-01-23Not used on Windows, don't even compile it then.Tor Lillqvist1-10/+60
2002-01-23 Tor Lillqvist <tml@iki.fi> * glib/gconvert.c: (strdup_len): Not used on Windows, don't even compile it then. (acceptable): Improve comments for the _acceptable_ table: put each ASCII char above the hex number for it. (g_escape_file_uri): On Windows, turn backslashes in the file name into plain ("forward") slashes. (g_filename_from_uri): On Windows, don't return the hostname "localhost", because we can not be 100% sure it will be recognized in all cases anyway, so simpler to turn it into a null hostname. Change slashes in the filename into backslashes, as that is the more canonical separator. Recognize drive letters (either followed by a colon or a vertical bar, as used by some browsers), and if the filename part starts with a such, don't include any (back)slash. Don't drop any extra leading slash in the filename on Unix. (g_filename_to_uri): On Windows, if the hostname is "localhost", don't use it, for consistency with g_filename_from_uri(). tests/uri-test.c: Change accordingly, so that all tests pass on Windows. Unix, too, I hope, though I couldn't check that now. (main): Unset the G_BROKEN_FILENAMES environment variable on Unix, as some tests require that filenames are in UTF-8. Is unsetenv() portable? These changes should fix bugs #59387, #59652, #59657 and #59658.
2002-01-05moved warning to error pragmas to their own file to not force 'goodHans Breuer1-1/+1
2002-01-05 Hans Breuer <hans@breuer.org> * glibconfig.h.win32.in msvc_recommended_pragmas.h (new file) : moved warning to error pragmas to their own file to not force 'good practice' programming in downstream libs and apps. Instead the new header will be used by -FImsvc_recommended_pragmas.h in gnome/cvs makefile.msc * */makefile.msc.in : use -FImsvc_recommended_pragmas.h
2001-12-22Add (undefined) HAVE_C99_VSNPRINTF.Tor Lillqvist1-33/+33
2001-12-21 Tor Lillqvist <tml@iki.fi> * config.h.win32.in: Add (undefined) HAVE_C99_VSNPRINTF. * glibconfig.h.win32.in: Add definition of G_HAVE_GROWING_STACK. * tests/Makefile.am: Rename the progs_LDADD, thread_LDADD and module_LDADD Make macros to progs_ldadd, thread_ldadd and module_ldadd. Newer automakes reserve macros named *_LDADD for the use as LDADDs for targets it knows. * glib/giowin32.c: (struct _GIOWin32Watch): 'callback' wasn't used here, either. 2001-12-21 Tor Lillqvist <tml@iki.fi> * gobject.def: Add g_signal_get_invocation_hint.
2001-12-18added some assertions to test g_signal_get_invocation_hint().Tim Janik1-5/+10
Tue Dec 18 21:39:57 2001 Tim Janik <timj@gtk.org> * testoverride.c: added some assertions to test g_signal_get_invocation_hint(). * gsignal.[hc]: remove signal_id argument from g_signal_chain_from_overridden(), the parameters are assumed to match the innermost signal currently in emission for this instance. added g_signal_get_invocation_hint() to figure the invocation hint of the innermost signal emission of an instance. * gsignal.c (g_signal_list_ids): fix G_BSEARCH_ARRAY_NODES() to access a bsearch array and not a pointer to it (discovered by Sven Neumann).
2001-12-14add rules to build it.James Henstridge1-0/+374
2001-12-14 James Henstridge <james@daa.com.au> * Makefile.am: add rules to build it. * testoverride.c: test program for closure override/chaining.
2001-12-12 This fixes #60543:Matthias Clasen1-0/+10
* glib/gutils.c (g_snprintf, g_vsnprintf): Switch to C99-[v]snprintf(). * tests/strfunc-test.c: Add some tests for g_snprintf().
2001-12-03g_module_symbol takes a gpointer *, not just a gpointerManish Singh1-1/+1
2001-12-03g_module_symbol takes a gpointer *, not just a gpointerManish Singh1-11/+11
2001-12-03 Manish Singh <yosh@gimp.org> * tests/module-test.c: g_module_symbol takes a gpointer *, not just a gpointer
2001-11-27Set this from libtool rather than hardcoding values for certain platforms.Dan Winship1-1/+2
* configure.in (G_MODULE_LDFLAGS): Set this from libtool rather than hardcoding values for certain platforms. * glib/libcharset/config.charset: Add a rule for NetBSD. * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases): If LIBCHARSET_ALIAS_DIR is set, look for charset.aliases there. * tests/Makefile.am (TESTS_ENVIRONMENT): set LIBCHARSET_ALIAS_DIR so we don't depend on charset.aliases having been installed
2001-11-26Implement G_LEVEL_ORDER correctly.Matthias Clasen1-1/+10
* glib/gnode.c (g_node_traverse): Implement G_LEVEL_ORDER correctly. * tests/node-test.c: Add a testcase for G_LEVEL_ORDER implementation. * glib/tmpl/trees-nary.sgml: Document G_LEVEL_ORDER better.
2001-11-24*/.cvsignore: Add various Win32 related file types.Tor Lillqvist1-0/+3
2001-11-24 Tor Lillqvist <tml@iki.fi> */.cvsignore: Add various Win32 related file types. gmodule: 2001-11-24 Tor Lillqvist <tml@iki.fi> * Makefile.am: Remove rule for testgmodule.exp, too. 2001-11-22 Tor Lillqvist <tml@iki.fi> * gmodule-win32.c: Current w32api headers do include tlhelp32.h, so no need to have an extract from it here.
2001-11-22Version 11, interface, binary age 0.Owen Taylor2-3/+4
Thu Nov 22 13:14:18 2001 Owen Taylor <otaylor@redhat.com> * configure.in (GLIB_MICRO_VERSION): Version 11, interface, binary age 0. * NEWS: Updated. * tests/Makefile.am (libmoduletestplugin_[ab]_la_LDFLAGS): Add dummy -rpath argument. On some (but not all) platforms, libtool will only build a convenience library without this. (#63486, Dan Winship) * Makefile.am (EXTRA_DIST): Add README.in, INSTALL.in - autoconf-2.5x checks for 'make dist' in the tarball when you make distcheck. * glib/Makefile.am (EXTRA_DIST): Distribute makefile.msc/mingw.in, glib.rc.in. * tests/patterntest.c: Include string.h. * glib/gpattern.c (g_utf8_reverse): doc parsing fix.
2001-11-18remove g_log_domain_glib usage/exportHans Breuer1-0/+1
2001-11-18 Hans Breuer <hans@breuer.org> * glib/glib.def : * glib/makefile.msc.in : remove g_log_domain_glib usage/export * tests/makefile.msc.in : add iochannel-test
2001-11-14Add back mainloop-test here, too.Tor Lillqvist3-6/+2
2001-11-15 Tor Lillqvist <tml@iki.fi> * tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test here, too. * tests/Makefile.am: Remove leftover comment that claimed mainloop-test is removed. 2001-11-15 Tor Lillqvist <tml@iki.fi> * gobject.def: Reflect recent changes.
2001-11-14add UTF-8 support.Matthias Clasen1-30/+61
* glib/gpattern.c: add UTF-8 support. * tests/patterntest.c: add UTF-8 and equality tests. * docs/reference/glib/Makefile.am (MKDB_OPTIONS): Add --sgml-mode. * docs/reference/glib/tmpl/patterns.sgml: Document UTF-8 support.
2001-11-14Patch from Andrew Taylor to improve tables and reduce relocations by usingOwen Taylor1-0/+3
Tue Nov 13 21:25:35 2001 Owen Taylor <otaylor@redhat.com> * glib/{gen-unicode-tables.pl,gunibreak.c,gunibreak.h, gunichartables.h, gunicomp.h, gunidecomp.[ch], guniprop.c}: Patch from Andrew Taylor to improve tables and reduce relocations by using indices rather than pointers. (#64433) * tests/unicode-normalize.c (main): Fix for changes to g_strsplit().
2001-11-13Fix max_tokens == 1 case to match documentation. Add tests.Darin Adler2-0/+14
* glib/gstrfuncs.c: (g_strsplit): Fix max_tokens == 1 case to match documentation. * tests/strfunc-test.c: (main): Add tests. * tests/.cvsignore: Recently-added test.
2001-11-03On Win32, create separate .exp file for module-test.o and link with that.Tor Lillqvist1-1/+6
2001-11-04 Tor Lillqvist <tml@iki.fi> * tests/Makefile.am: On Win32, create separate .exp file for module-test.o and link with that. Otherwise the GNU linker doesn't export the g_clash_func.
2001-11-02Recurse with may_block = FALSE, so we don't get into the pathology whereOwen Taylor2-4/+10
Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com> * tests/mainloop-test.c (recurser_idle): Recurse with may_block = FALSE, so we don't get into the pathology where the recurser_idle recurses for 10 iterations, and the only thing that is running is the recurser idle, which adds another recursion for each of those 10 iterations and.... * tests/mainloop-test.c (create_crawler): Fix race condition where a crawler source could be destroyed before it was added to the crawler array. * test/Makefile.am: Add mainloop-test back.
2001-10-29Fix non-Intel/-Alpha version of the G_BREAKPOINT macro to includeDaniel Egger1-1/+3
2001-10-29 Daniel Egger <degger@fhm.edu> * glib/gbacktrace.h: Fix non-Intel/-Alpha version of the G_BREAKPOINT macro to include <signal.h> and use SIGTRAP. * glib/gmessages.c: Conditionalise definition of args2 depending on the definition of HAVE_VSNPRINTF to avoid compiler warning. * gobject/testgruntime.c * tests/patterntest.c: Include <string.h> to avoid warnings.
2001-10-28Add missing g_pattern_match_simple and g_pattern_spec_equal.Tor Lillqvist1-1/+1
2001-10-28 Tor Lillqvist <tml@iki.fi> * glib/glib.def: Add missing g_pattern_match_simple and g_pattern_spec_equal. * glib/gwin32.c (g_win32_get_package_installation_subdirectory): Set separator correctly. * glib/libcharset/config.charset (os): Match also mingw*. * tests/testglib.c (main): (Win32): Print the lib/locale subdirectory, as that is what actually gets used.
2001-10-25Add ../* to PATH before running tests to find DLLs.Tor Lillqvist1-1/+1
2001-10-26 Tor Lillqvist <tml@iki.fi> * tests/makefile.msc.in: Add ../* to PATH before running tests to find DLLs.