Commit Graph

4993 Commits

Author SHA1 Message Date
Tor Lillqvist
04aec5b28d Implement #491549: On Windows, always use the native API for character set
2007-11-26  Tor Lillqvist  <tml@novell.com>

	Implement #491549: On Windows, always use the native API for
	character set conversions instead of GNU libiconv. Almost all
	codesets supported by GNU libiconv exist as Windows codepages.
	One missing feature is the "C99" and "JAVA" pseudo codesets, but I
	doubt that is worth worrying about.
	
	* glib/win_iconv.c: New file. iconv() implementation for
	Windows. Placed in the public domain by Yukihiro Nakadaira
	<yukihiro.nakadaira@gmail.com>. From
	http://yukihiro.nakadaira.googlepages.com/win_iconv.zip, his
	2007-11-17 version.

	* glib/gconvert.c: Include win_iconv.c on Windows.

	* configure.in: Bypass iconv checks on Windows. 


svn path=/trunk/; revision=5937
2007-11-25 23:27:45 +00:00
Tor Lillqvist
6fdcc7ddb2 Add conditionals for non-Unix. Just g_error() unless G_OS_UNIX for now.
2007-11-25  Tor Lillqvist  <tml@novell.com>

	* glib/gtestutils.c: Add conditionals for non-Unix. Just g_error()
	unless G_OS_UNIX for now.


svn path=/trunk/; revision=5936
2007-11-25 22:47:39 +00:00
Tor Lillqvist
5309d10f8f Do install gtestutils.h even on Win32.
svn path=/trunk/; revision=5935
2007-11-25 21:47:16 +00:00
Tor Lillqvist
d2b9634cb7 Build gtestutils etc on OS_UNIX only.
2007-11-25  Tor Lillqvist  <tml@novell.com>

	* glib/Makefile.am: Build gtestutils etc on OS_UNIX only.


svn path=/trunk/; revision=5934
2007-11-25 21:39:42 +00:00
Matthias Clasen
d2f111fca7 Require gtk-doc 1.8.
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8.

        * glib/gasyncqueue.c:
        * glib/gdate.c:
        * glib/gfileutils.c:
        * glib/gmain.c:
        * glib/gmarkup.c:
        * glib/gregex.c:
        * glib/gtestutils.c:
        * glib/gutils.c: Use gtk-doc abbreviations for
        examples in doc comments.


svn path=/trunk/; revision=5933
2007-11-25 06:05:06 +00:00
Matthias Clasen
0c01c6f1ad Replace INCLUDES by AM_CPPFLAGS, other cleanups.
2007-11-24  Matthias Clasen  <mclasen@redhat.com>

        * */Makefile.am: Replace INCLUDES by AM_CPPFLAGS, other
        cleanups.



svn path=/trunk/; revision=5932
2007-11-25 04:22:45 +00:00
Matthias Clasen
ed1afd7772 Fix a memory overrun
svn path=/trunk/; revision=5928
2007-11-24 16:24:30 +00:00
Claude Paroz
08ddf99627 Updated French translation.
2007-11-24  Claude Paroz  <claude@2xlibre.net>

	* fr.po: Updated French translation.

svn path=/trunk/; revision=5926
2007-11-24 10:56:37 +00:00
Matthias Clasen
6dc2fe2078 Remove leftover ENABLE_NLS #ifdefs.
2007-11-24  Matthias Clasen  <mclasen@redhat.com>

        * glib/gutils.c: Remove leftover ENABLE_NLS #ifdefs.



svn path=/trunk/; revision=5920
2007-11-24 05:13:41 +00:00
Matthias Clasen
78c06eafe1 Don't refuse to encode a single byte. (Milan Crha)
2007-11-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/gbase64.c (g_base64_encode): Don't refuse to encode
        a single byte.  (Milan Crha)

        * tests/base64-test.c: Test encoding short strings.



svn path=/trunk/; revision=5919
2007-11-23 17:58:00 +00:00
Daniel Nylander
39ad6fbd02 sv.po: Updated Swedish translation
svn path=/trunk/; revision=5918
2007-11-23 11:13:33 +00:00
Matthias Clasen
a1ac3c0e23 Define a two-argument macro C_() for marking translatable strings with
2007-11-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/gi18n-lib.h:
        * glib/gi18n.h: Define a two-argument macro C_() for marking
        translatable strings with context and implement C_() and Q_()
        using g_dpgettext().  (#142676, Morten Welinder)

        * glib/glib.symbols:
        * glib/gstrfuncs.[hc]: Implement g_dpgettext().


svn path=/trunk/; revision=5917
2007-11-23 07:50:54 +00:00
Matthias Clasen
0d723a240e Use g_print to print out --help text in locale encoding. (#469551, Takao
2007-11-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/goption.c: Use g_print to print out --help text in
        locale encoding.  (#469551, Takao Fujiwara)



svn path=/trunk/; revision=5916
2007-11-23 05:58:51 +00:00
Matthias Clasen
ccf93c8693 Set length out param in list-returning functions to 0 when returning NULL.
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        * glib/gkeyfile.c: Set length out param in list-returning functions
        to 0 when returning NULL.  (#498728, Christian Persch)



svn path=/trunk/; revision=5915
2007-11-23 04:17:58 +00:00
21:06:47 Tim Janik
1e55738f31 initialize automake variables EXTRA_DIST and TEST_PROGS for unconditional
2007-11-21 21:06:47  Tim Janik  <timj@imendio.com>

	* Makefile.decl: initialize automake variables EXTRA_DIST and
	TEST_PROGS for unconditional appending via += in other makefiles.
	define recursive test targets: test, test-report, perf-report,
	full-report, as described here:
      http://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00000.html

	* Makefile.am:
	* build/win32/vs8/Makefile.am, build/win32/dirent/Makefile.am:
	* build/win32/Makefile.am, build/Makefile.am:
	* docs/Makefile.am, docs/reference/Makefile.am:
	* docs/reference/glib/Makefile.am, docs/reference/gobject/Makefile.am:
	* gmodule/Makefile.am, tests/Makefile.am:
	* tests/refcount/Makefile.am, tests/gobject/Makefile.am:
	* glib/update-pcre/Makefile.am, glib/libcharset/Makefile.am:
	* glib/tests/Makefile.am, glib/pcre/Makefile.am:
	* glib/gnulib/Makefile.am, gobject/Makefile.am, m4macros/Makefile.am:
	* gthread/Makefile.am, glib/Makefile.am:
	include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.

	* glib/tests/Makefile.am: removed example testing rules.

	* glib/tests/testing.c: conditionalized performance and slow tests.

	* glib/gtestutils.h:
	* glib/gtestutils.c: work around g_test_config_vars not changing its
	exported value after value assignments, aparently due to symbol aliases.

	* glib/gtester.c: fixed off-by-one error which produced junk in logs.

	* configure.in: check for python >= 2.4 and provide $PYTHON for scripts.


svn path=/trunk/; revision=5914
2007-11-21 20:09:46 +00:00
Yannig MARCHEGAY
49568d5f16 Updated Occitan translation
svn path=/trunk/; revision=5913
2007-11-20 21:12:06 +00:00
Tim Janik
a2bcee8f62 Fixed copyright for newly submitted files.
svn path=/trunk/; revision=5912
2007-11-20 17:35:26 +00:00
Tim Janik
fa9a420c8e ChangeLog: added GLib testing utility development history.
svn path=/trunk/; revision=5911
2007-11-20 15:01:04 +00:00
Tim Janik
6332518cc2 Renamed gtestframework to gtestutils.
* glib/glib.h:
* glib/Makefile.am: added gtestutils.h to public includes.

* glib/gtestutils.c: include gtestutils.h.

* glib/gtestutils.h:
* glib/glib.symbols:
* glib/tests/testing.c: renamed gtestframework to gtestutils.

* glib/gtestframework.h: renamed to gtestutils.h.

* glib/gtestframework.c: renamed to gtestutils.c.

svn path=/trunk/; revision=5910
2007-11-20 15:01:02 +00:00
Tim Janik
0324be2048 glib/gtestframework.c: g_test_init(): make warnings and criticals fatal for all test programs.
svn path=/trunk/; revision=5909
2007-11-20 15:01:00 +00:00
Tim Janik
d3c69f19a2 gtestframework.c: added test API documentation by Sven Herzberg and Tim Janik.
svn path=/trunk/; revision=5908
2007-11-20 15:00:59 +00:00
Tim Janik
f3d2520702 gtestframework.[hc]: implemented g_test_queue_destroy() and g_test_queue_unref().
svn path=/trunk/; revision=5907
2007-11-20 15:00:57 +00:00
Tim Janik
515c53474a Added g_test_bug() and related API.
* gtester.c: handle G_TEST_LOG_MESSAGE and test test message API.

* gtestframework.h, gtestframework.c: added test message API and convenience
API to send test messages about bug URLs.

svn path=/trunk/; revision=5906
2007-11-20 15:00:56 +00:00
Tim Janik
a0409304dc Added API to access test framework configuration.
* gtestframework.h, gtestframework.c: export testing configuration to test
programs with g_test_quick(), g_test_perf(), g_test_verbose(), g_test_quiet().

svn path=/trunk/; revision=5905
2007-11-20 15:00:54 +00:00
Tim Janik
a46a52941b gtester: implemented logic to handle failing tests, self tests, and validate XML reports.
* gtester.c: terminate when tests failed. keep XML valid when test cases fail.
restart test binaries when tests fail, resuming after the last processed test.
support --gtester-selftest to run gtester itself as test program.
support --test-arg=<arg> to pass args along to test programs. added
main_selftest() which does a simplistic fixture test. fail if exit
code of test programs is not 0.

* gtestframework.h: added G_TEST_LOG_SKIP_CASE test log message type.

* gtestframework.c: support --GTestSkipCount=<n> to skip a number of tests.

* tests/Makefile.am: added test-report: for demonstration purposes.
added gtester-xmllint-check: and hooked it up into check:, this rule calls
gtester as test program, running it's selftest, and then uses xmllint to
validate the generate XML test log file.

svn path=/trunk/; revision=5904
2007-11-20 15:00:53 +00:00
Tim Janik
f347900eaf gtester: implemented XML logging.
* glib/gtester.c: log test messages to XML output file. beautified normal test
result output.

* glib/gtestframework.c: fixed GTimer leak.

* glib/tests/Makefile.am: start gtester with --verbose.

svn path=/trunk/; revision=5903
2007-11-20 15:00:51 +00:00
Tim Janik
6bc38c46e7 tests/Makefile.am: execute test programs with gtester, add test: to check:
svn path=/trunk/; revision=5902
2007-11-20 15:00:50 +00:00
Tim Janik
f843b379d0 Fixed PLT symbol exports for gtestframework.h.
* glib/glib.symbols: added all exported gtestframework.h symbols.

* glib/gtestframework.c: include galias.h, galiasdef.c, define __G_TESTFRAMEWORK_C__.

svn path=/trunk/; revision=5901
2007-11-20 15:00:48 +00:00
Tim Janik
2b7dbd9aab glib/gtester.c: fixed debugging flag.
svn path=/trunk/; revision=5900
2007-11-20 15:00:47 +00:00
Tim Janik
bca1fe406e fixed bogus unistd.h include.
svn path=/trunk/; revision=5899
2007-11-20 15:00:46 +00:00
Tim Janik
22ac72234a Implemented test log IPC.
* gtester.c: read and decode log messages from test binary child processes.
fixed GIOChannel and child watch handling to process all messages and avoid
hangs. pass --verbose and --quiet on to children, default to --quiet.

* gtestframework.h: export g_test_log_type_name().

* gtestframework.c: send test log to --GTestLogFD=<fd> if given, removed
bogus -o-option.

svn path=/trunk/; revision=5898
2007-11-20 15:00:45 +00:00
Tim Janik
add119f8e1 gtester.c: support test case listing through gtester.
svn path=/trunk/; revision=5897
2007-11-20 15:00:44 +00:00
Tim Janik
a7dc2ea272 gtestframework.c: fixed testpath matches for automatic root suite.
svn path=/trunk/; revision=5896
2007-11-20 15:00:43 +00:00
Tim Janik
d0709d04cb gtester.c: adapted to become a rudimentary test binary launcher.
* gtester.c: increased read buffer size to match common unix pipe buffer size.
added argument parsing and usage. changed io handling to capture and replicate
stdout. fixed io handlers to be cleaned up when the child process exits (catch
G_IO_ERR | G_IO_HUP). we now use pending/iteration instead of a main loop
structure, to keep running until the child process exits and all io has been
processed. launch the test binaries given on the command line. don't quit when
a child couldn't be launched but --keep-going was specified.

svn path=/trunk/; revision=5895
2007-11-20 15:00:41 +00:00
Tim Janik
39cf400cdf Integrated gtester program into build process.
* Makefile.am: build and install gtester binary.

* gtester.c: fixed up coding style and removed hard wired test coded.

svn path=/trunk/; revision=5894
2007-11-20 15:00:40 +00:00
Tim Janik
bf51c15b89 glib/gtester.c:Small -Wall fix
svn path=/trunk/; revision=5893
2007-11-20 15:00:39 +00:00
Tim Janik
26988f5776 glib/gtester.c:Implemented nonblocking reading properly now
svn path=/trunk/; revision=5892
2007-11-20 15:00:38 +00:00
Tim Janik
a09ee4dc20 glib/gtester.c:Quit the application when the output is parsed completely, not just the process finished
svn path=/trunk/; revision=5891
2007-11-20 15:00:37 +00:00
Tim Janik
dce1a63bf4 glib/gtester.c:Read the output of the child process
svn path=/trunk/; revision=5890
2007-11-20 15:00:36 +00:00
Tim Janik
e413112683 glib/gtester.c:Use g_spawn_async_with_pipes()
svn path=/trunk/; revision=5889
2007-11-20 15:00:35 +00:00
Tim Janik
0217653b80 glib/gtester.c:Spawn a process async and quit gtester after the child process exited
svn path=/trunk/; revision=5888
2007-11-20 15:00:34 +00:00
Tim Janik
66bef13e6f glib/gtester.c:Added a first revision of gtester
svn path=/trunk/; revision=5887
2007-11-20 15:00:33 +00:00
Tim Janik
25053dc518 Implemented test log serialization.
* glib/gtestframework.h: added g_test_log*() API.

* glib/gtestframework.c: implement test log serialization.

svn path=/trunk/; revision=5886
2007-11-20 15:00:32 +00:00
Tim Janik
e3c66f03e0 Implemented test logging basics.
* glib/gtestframework.c: added --debug-log and --verbose, implemented
test information logging.

* testing.c: test g_test_maximized_result() and g_test_minimized_result().

svn path=/trunk/; revision=5885
2007-11-20 15:00:31 +00:00
Tim Janik
6145aaca50 Implemented g_test_timer*().
* gtestframework.c: implemented g_test_timer*().

* tests/testing.c: added a g_test_timer*() test.

svn path=/trunk/; revision=5884
2007-11-20 15:00:30 +00:00
Tim Janik
ba166c0081 Implemented support for testpaths.
* gtestframework.c: implemented g_test_add_vtable() and g_test_add_func().

* tests/testing.c: use g_test_add() and g_test_add_func() to majorly simplify main().

svn path=/trunk/; revision=5883
2007-11-20 15:00:29 +00:00
Tim Janik
b2a4c8bae2 testing.c: added tests for the g_test_rand*() API.
svn path=/trunk/; revision=5882
2007-11-20 15:00:28 +00:00
Tim Janik
e47c4253f9 Implemented g_test_rand*().
* gtestframework.h: fixed g_assert_cmp*() to evaluate arguments only once.
added g_assert_cmpuint(). completed g_test_rand*() to cover bits, ints,
doubles and ranges.

* gtestframework.c: fixed "--seed" option and implemented g_test_rand*().

svn path=/trunk/; revision=5881
2007-11-20 15:00:27 +00:00
Tim Janik
fcf30698fe testing.c: added tests for g_assert_cmphex() and forked test traps.
svn path=/trunk/; revision=5880
2007-11-20 15:00:26 +00:00
Tim Janik
f1d751b76e Implemented g_test_trap_fork() API.
* gtestframework.h: added g_assert_cmphex(). reworked g_test_trap*() API.

* gtestframework.c: implemented g_test_trap_fork() API.

svn path=/trunk/; revision=5879
2007-11-20 15:00:25 +00:00