Ryan Lortie [Fri, 10 Jan 2014 17:28:14 +0000 (12:28 -0500)]
tests: fix leaks in option-context test
Use the new g_option_context_parse_strv() to patch up some leaks in some
insufficiently-argv-emulating testcases in option-context.c.
This gives some test coverage of the new function while also making
option-context now leak-free.
https://bugzilla.gnome.org/show_bug.cgi?id=721947
Ryan Lortie [Fri, 10 Jan 2014 17:16:24 +0000 (12:16 -0500)]
GOptionContext: add memory-friendly parse mode
Add g_option_context_parse_strv() that obeys the normal memory conventions for
dealing with a strv instead of assuming that we're dealing with the 'argv'
parameter to main().
This will help for using GOptionContext with GApplication.
https://bugzilla.gnome.org/show_bug.cgi?id=721947
Ryan Lortie [Fri, 10 Jan 2014 16:17:44 +0000 (11:17 -0500)]
GApplication: allow handles_commandline and service
The default local_command_line handler has a fast return path for the
case that we handle the commandline by forwarding it to the primary
instance, but this doesn't account for the fact that we may want to
become a service.
Allow for this by making sure we don't take the fast path of the service
flag is set.
Ryan Lortie [Sat, 26 Oct 2013 16:27:20 +0000 (12:27 -0400)]
GApplication: add --gapplication-service switch
Add a --gapplication-service switch to the default implementation of
local_command_line. This name is unlikely to clash with any option used
by an existing application.
When a normal application (neither service nor launcher) is launched with
exactly this one argument, G_APPLICATION_IS_SERVICE will be set.
The idea is that people will write their D-Bus service file with
--gapplication-service on the Exec line. This provides a nice
compromise for people who want the benefits of DBusActivatable
applications but without losing the ability to easily run them directly
(under the debugger or inside jhbuild, etc.)
https://bugzilla.gnome.org/show_bug.cgi?id=710965
Ryan Lortie [Wed, 8 Jan 2014 16:01:55 +0000 (11:01 -0500)]
gdbus-introspection test: test escaping attributes
Make sure attribute values are properly escaped in generated XML.
https://bugzilla.gnome.org/show_bug.cgi?id=721796
Ryan Lortie [Wed, 8 Jan 2014 15:56:57 +0000 (10:56 -0500)]
gdbus: properly escape introspection annotations
Make sure we escape any special characters that are found in annotation
names or values to avoid emitting a malformed XML document in response
to an Introspect call.
https://bugzilla.gnome.org/show_bug.cgi?id=721796
Matthias Clasen [Wed, 8 Jan 2014 03:55:43 +0000 (22:55 -0500)]
Add includes to all gio docs
Dan Winship [Tue, 7 Jan 2014 16:18:54 +0000 (11:18 -0500)]
Document g_test_run() order better, and how it changed
But also note that the ordering is strictly an aesthetic/convenience
thing, and that tests should not be written to depend on it.
https://bugzilla.gnome.org/show_bug.cgi?id=721624
Claudio Saavedra [Tue, 7 Jan 2014 09:33:14 +0000 (11:33 +0200)]
glib/tests: fix build
Chun-wei Fan [Mon, 6 Jan 2014 02:05:48 +0000 (10:05 +0800)]
glib/tests/keyfile.c: Use g_close()
Use g_close() instead, as close() is really found in io.h on Windows, not
unistd.h as on Unix, and hence unistd.h is not universally available.
https://bugzilla.gnome.org/show_bug.cgi?id=719344
Chun-wei Fan [Sat, 4 Jan 2014 02:52:15 +0000 (10:52 +0800)]
glib/tests/date.c: Fix the tests on non-English Windows
The names of the month (and abbreviations) are specific to the Windows
system locale, so we need to use SetThreadLocale() to set the locale of
the running program to en-US so that it will parse "March" and "Sept" etc.
correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=719344
Ryan Lortie [Mon, 6 Jan 2014 18:58:41 +0000 (13:58 -0500)]
Fix one-character typo in old NEWS entry
Change a very confusing typo "will not" -> "will now" about the
g_critical() on removing non-existent sources.
https://bugzilla.gnome.org/show_bug.cgi?id=721625
Chun-wei Fan [Mon, 6 Jan 2014 04:31:18 +0000 (12:31 +0800)]
Fix GLib MSVC Project
The glib/gthread-win32.c was accidently removed from the last commit, sorry
Chun-wei Fan [Mon, 6 Jan 2014 04:21:46 +0000 (12:21 +0800)]
Tidy Up the glib MSVC Project
Move the per-source define/undefine cflags into the property sheets, and
apply the cflags for the bundled PCRE sources to the PCRE sources only
Chun-wei Fan [Mon, 6 Jan 2014 03:22:39 +0000 (11:22 +0800)]
Drop the testglib MSVC Projects
There are many test programs that are shipped with GLib, and this project
is a one-to-one project, which does not make sense to keep as various test
programs may have different CFLAGS, etc, which will require different build
options.
Matthias Clasen [Sun, 5 Jan 2014 02:09:18 +0000 (21:09 -0500)]
Use tap mode for installed tests too, when using tap
Rico Tzschichholz [Sat, 4 Jan 2014 21:04:20 +0000 (22:04 +0100)]
glib/tests: Fix non-debug build of slice test
In addition to
e013cf9cad56e919af2f057eb52d58371483a6f8
Jasper St. Pierre [Sat, 4 Jan 2014 06:40:24 +0000 (01:40 -0500)]
tests/keyfile: Fix build
Chun-wei Fan [Fri, 3 Jan 2014 15:48:04 +0000 (23:48 +0800)]
gio/tests/giomodule.c: Use G_MODULE_SUFFIX
The file extension of the GIO module could be something other than .so,
depending on platform. Use G_MODULE_SUFFIX so that the test will run
correctly on non-*nix platforms, such as Windows.
https://bugzilla.gnome.org/show_bug.cgi?id=719344
Chun-wei Fan [Tue, 17 Dec 2013 02:58:15 +0000 (10:58 +0800)]
Fix the Keyfile Test on Windows
Windows will not allow one to write to a temp file opened by g_mkstemp()
by opening another fd associated with it before one closes the fd that
is returned by g_mkstemp(), which will cause the test_save test to fail.
Fix this by using a variable to store the fd from g_mkstemp() and checking
it, and call close() on that variable before attempting to call
g_key_file_save_to_file() on the temp file as that will attempt to open
another fd (which would not work) associated with that temp file.
https://bugzilla.gnome.org/show_bug.cgi?id=719344
Michael Catanzaro [Fri, 3 Jan 2014 01:40:47 +0000 (19:40 -0600)]
docs: fix two typos
Ryan Lortie [Thu, 2 Jan 2014 21:43:13 +0000 (16:43 -0500)]
unix signals: stop using atomics
They are not required here. See the discussion in the bug report.
https://bugzilla.gnome.org/show_bug.cgi?id=711090
Rafael Ferreira [Fri, 3 Jan 2014 00:08:14 +0000 (22:08 -0200)]
Updated Brazilian Portuguese translation
Matthias Clasen [Thu, 2 Jan 2014 18:25:41 +0000 (13:25 -0500)]
Fix make install with --disable-installed-tests
If installed tests are not enabled, installed_testdir is not
defined, so we end up trying to create /modules and to chmod
things in /x-content/, which is not right.
Ryan Lortie [Thu, 2 Jan 2014 17:54:12 +0000 (12:54 -0500)]
GFile: fix uninitialised variable
clang cause the fact that some of our 'goto out;' cases cause use to try
and free an uninitialised GString. Fix that up.
Ryan Lortie [Thu, 2 Jan 2014 06:38:07 +0000 (01:38 -0500)]
GDBusConnection: don't write to stdout
When losing the D-Bus connection, we would write to stdout about it just
before killing ourselves with SIGTERM. We're a library, so we should
probably use stderr instead.
https://bugzilla.gnome.org/show_bug.cgi?id=721324
Ryan Lortie [Thu, 2 Jan 2014 06:55:07 +0000 (01:55 -0500)]
gsettings: tweak test for last commit
The last commit changed the behaviour of child objects of delayed
GSettings. Adjust the testcase accordingly.
Ryan Lortie [Sun, 22 Dec 2013 04:13:57 +0000 (23:13 -0500)]
g_settings_get_child(): inherit backend
Part of the purpose of g_settings_get_child() was that it could be used
after you delay() a GSettings object, and then apply() all of the
settings together. In order for that to work, we need to share the
backend.
https://bugzilla.gnome.org/show_bug.cgi?id=720891
Matthias Clasen [Thu, 2 Jan 2014 04:28:23 +0000 (23:28 -0500)]
Make symlink test work installed
We can't assume that the location used for G_TEST_DIST paths
is writable, so just create the symlink in the current directory
instead.
Matthias Clasen [Thu, 2 Jan 2014 03:39:32 +0000 (22:39 -0500)]
Drop locale-dependent timeval tests
Matthias Clasen [Thu, 2 Jan 2014 03:30:24 +0000 (22:30 -0500)]
Make /contenttype/tree test work installed
The x-content/win32-software type is only recognized if
the autorun.exe file is executable. Since the file is installed
as data, we need to fix up its permissions in an
install-data-hook.
Matthias Clasen [Thu, 2 Jan 2014 03:01:15 +0000 (22:01 -0500)]
Avoid a compiler warning
Matthias Clasen [Thu, 2 Jan 2014 02:39:51 +0000 (21:39 -0500)]
Make timeval tests independent of the environment
Some of the tested formats are locale-dependent, so unset
the TZ environment variable before testing them.
Chun-wei Fan [Thu, 2 Jan 2014 01:54:18 +0000 (09:54 +0800)]
MSVC 2012 Projects: Rename a Property Sheet
Forgot to update the property sheet file name from the Visual Studio 2010
update... Sorry!
Ryan Lortie [Tue, 29 Oct 2013 18:11:28 +0000 (11:11 -0700)]
Fix races in unix signal dispatch
Fix some races introduced in
be2c7b83c4a9c9d3aa76b1499c27ab19e0f4e470
while keeping the property that multiple handlers for the same unix
signal all get dispatched.
Also fix the behaviour of the source checking for pending signals when
it's created. No matter what we do here (clear the pending flag or not)
there is something that can go wrong.
If we clear the flag, we may prevent other sources from being
dispatched. If we don't clear it, we may end up dispatching the same
source twice (if we manage to dispatch it from its own thread before the
GLib worker has a chance to run).
Instead, run the full dispatch procedure when a new source is added. It
actually doesn't matter what thread this runs in since the lock is held.
https://bugzilla.gnome.org/show_bug.cgi?id=711090
Colin Walters [Thu, 2 Jan 2014 00:05:34 +0000 (19:05 -0500)]
gio/tests: Fix usage of BUILT_SOURCES
Yosef Or Boczko [Wed, 1 Jan 2014 23:40:26 +0000 (01:40 +0200)]
Fix doc build
Matthias Clasen [Wed, 1 Jan 2014 22:42:33 +0000 (17:42 -0500)]
Improve gutils.c test coverage
Matthias Clasen [Wed, 1 Jan 2014 22:41:59 +0000 (17:41 -0500)]
Improve GDate test coverage
Matthias Clasen [Tue, 31 Dec 2013 14:19:50 +0000 (09:19 -0500)]
Improve GIOChannel test coverage
Matthias Clasen [Tue, 31 Dec 2013 14:19:22 +0000 (09:19 -0500)]
Improve hostutils test coverage
Matthias Clasen [Tue, 31 Dec 2013 14:18:50 +0000 (09:18 -0500)]
Improve GVariant test coverage
Matthias Clasen [Tue, 31 Dec 2013 14:18:30 +0000 (09:18 -0500)]
Test stdio wrappers
Matthias Clasen [Tue, 31 Dec 2013 01:18:15 +0000 (20:18 -0500)]
Trivial typo fix
Matthias Clasen [Mon, 30 Dec 2013 15:55:07 +0000 (10:55 -0500)]
Improve charset test coverage
Matthias Clasen [Mon, 30 Dec 2013 15:54:46 +0000 (10:54 -0500)]
Add tests for g_malloc
Matthias Clasen [Mon, 30 Dec 2013 15:53:32 +0000 (10:53 -0500)]
Drop memory-related trap variables
These are just more lo-tech conditional breakpoint wannabes.
Debuggers can be trusted to support conditional breakpoints
nowadays.
Matthias Clasen [Mon, 30 Dec 2013 14:49:30 +0000 (09:49 -0500)]
Improve GAsyncQueue test coverage
Matthias Clasen [Mon, 30 Dec 2013 14:48:56 +0000 (09:48 -0500)]
Improve test coverage of g_utf8_collate_key_for_filename
The existing tests were accidentally using the same test data
twice. Fix that, and add another set of tests that exercise
the filename collation special cases.
Matthias Clasen [Mon, 30 Dec 2013 14:48:29 +0000 (09:48 -0500)]
Add tests for g_spaced_primes_closest
Matthias Clasen [Mon, 30 Dec 2013 14:48:10 +0000 (09:48 -0500)]
Improve GOptionContext test coverage
Matthias Clasen [Mon, 30 Dec 2013 14:47:49 +0000 (09:47 -0500)]
Improve GBookmarkFile test coverage
Matthias Clasen [Tue, 31 Dec 2013 17:45:09 +0000 (12:45 -0500)]
GBookmarkFile: Streamline error handling a bit
Matthias Clasen [Tue, 31 Dec 2013 17:48:05 +0000 (12:48 -0500)]
GBookmarkFile: Remove dead code
The icon element is actually parsed further up, and this
case is never hit, so remove it.
Matthias Clasen [Mon, 30 Dec 2013 14:45:53 +0000 (09:45 -0500)]
Make a bookmark testfile roundtrippable
This will be used in new tests in the following commit.
Matthias Clasen [Mon, 30 Dec 2013 13:57:04 +0000 (08:57 -0500)]
Trivial formatting fixes
Matthias Clasen [Sun, 29 Dec 2013 18:47:43 +0000 (13:47 -0500)]
Improve glib-unix test coverage
Matthias Clasen [Sun, 29 Dec 2013 18:46:00 +0000 (13:46 -0500)]
Improve GHashTable test coverage
Matthias Clasen [Sun, 29 Dec 2013 18:45:38 +0000 (13:45 -0500)]
Add a test for g_markup_parse_context_get_element_stack
Matthias Clasen [Sun, 29 Dec 2013 18:43:28 +0000 (13:43 -0500)]
Remove broken attempt at parsing date-only
g_time_val_from_iso8601 was attempting to parse strings
having only a date, but failed to actually set the timeval
despite returning TRUE. Since the docs state that the function
only parses strings containing a date and a time, just return
FALSE in this case.
Also remove an incomplete testcase for this behaviour that was
just checking the boolean return value, but not timeval.
Matthias Clasen [Sun, 29 Dec 2013 12:55:14 +0000 (07:55 -0500)]
Add missing includes
config.h needs to be included in every source file, first.
Matthias Clasen [Sun, 29 Dec 2013 12:23:19 +0000 (07:23 -0500)]
Improve mainloop test coverage
Matthias Clasen [Sun, 29 Dec 2013 12:23:01 +0000 (07:23 -0500)]
Add tests for GTimer and GTimeVal
Matthias Clasen [Thu, 26 Dec 2013 04:52:15 +0000 (23:52 -0500)]
Improve GTree test coverage
Matthias Clasen [Thu, 26 Dec 2013 04:51:58 +0000 (23:51 -0500)]
Improve logging test coverage
Matthias Clasen [Thu, 26 Dec 2013 04:51:26 +0000 (23:51 -0500)]
Improve testing test coverage
In particular, test the just-fixed g_test_trap_reached_timeout.
Matthias Clasen [Thu, 26 Dec 2013 04:50:37 +0000 (23:50 -0500)]
Fix g_test_trap_reached_timeout
The function was returning the opposite of what the
documentation says.
Matthias Clasen [Wed, 25 Dec 2013 04:35:31 +0000 (23:35 -0500)]
Improve GSlice test coverage
Matthias Clasen [Wed, 25 Dec 2013 04:33:28 +0000 (23:33 -0500)]
Improve GNode test coverage
Matthias Clasen [Wed, 25 Dec 2013 04:26:25 +0000 (23:26 -0500)]
Improve fileutils test coverage
Add some tests for g_file_read_link.
Matthias Clasen [Wed, 25 Dec 2013 04:24:40 +0000 (23:24 -0500)]
Unify error reporting in gfileutils.c
Use the set_file_error helper function in more places,
saving some 50 lines.
Matthias Clasen [Tue, 24 Dec 2013 05:06:00 +0000 (00:06 -0500)]
Improve GResourceFile test coverage
Matthias Clasen [Tue, 24 Dec 2013 05:05:36 +0000 (00:05 -0500)]
Improve gsettings test coverage
Matthias Clasen [Tue, 24 Dec 2013 05:05:01 +0000 (00:05 -0500)]
Improve gdbus test coverage
Matthias Clasen [Tue, 24 Dec 2013 05:04:44 +0000 (00:04 -0500)]
Improve converter test coverage
Matthias Clasen [Tue, 24 Dec 2013 05:04:14 +0000 (00:04 -0500)]
Add tests for remote actions
This improves the GApplication test coverage.
Matthias Clasen [Tue, 24 Dec 2013 05:03:20 +0000 (00:03 -0500)]
Improve GIOModule test coverage
Add a dedicated test for GIOModule.
Matthias Clasen [Tue, 24 Dec 2013 05:01:22 +0000 (00:01 -0500)]
Correct a doc comment
Matthias Clasen [Tue, 24 Dec 2013 04:59:56 +0000 (23:59 -0500)]
GIOModule: Add some more details to the docs
Matthias Clasen [Tue, 24 Dec 2013 04:59:37 +0000 (23:59 -0500)]
Fix a typo in a comment
The D-Bus interface is org.freedesktop.DBus.Peer, not
org.freedesktop.DBus.
Matthias Clasen [Mon, 23 Dec 2013 20:47:45 +0000 (15:47 -0500)]
Add a generic property test
This test is inspired by its namesake in GTK+. We instantiate
all types, and check the default values of their properties,
with some exceptions for types that are known not to work.
Matthias Clasen [Mon, 23 Dec 2013 20:01:20 +0000 (15:01 -0500)]
GTlsPassword: Make declared defaults match
String properties typically start out with a value of NULL.
No reason to deviate from that convention here.
Matthias Clasen [Mon, 23 Dec 2013 20:00:55 +0000 (15:00 -0500)]
Make GFileIcon more robust
No reason not to survive g_object_unref (g_object_new (...))
Matthias Clasen [Mon, 23 Dec 2013 20:00:18 +0000 (15:00 -0500)]
Make GEmblem more robust
No reason not to survive g_object_unref (g_object_new (...)).
Matthias Clasen [Mon, 23 Dec 2013 20:00:02 +0000 (15:00 -0500)]
Trivial formatting fixes
Matthias Clasen [Mon, 23 Dec 2013 17:11:03 +0000 (12:11 -0500)]
Add tests for x-content type sniffing
This test exercises the tree matching parts of gcontenttype.c
Matthias Clasen [Mon, 23 Dec 2013 17:09:46 +0000 (12:09 -0500)]
Simplify fileattributematcher tests a bit
Just use assertions instead of pretty-printed error messages.
Matthias Clasen [Mon, 23 Dec 2013 17:08:47 +0000 (12:08 -0500)]
Improve GApplicationCommandline test coverage
Add tests for many GApplicationCommandline apis to the
existing application tests.
Matthias Clasen [Mon, 23 Dec 2013 17:08:08 +0000 (12:08 -0500)]
Improve GSubprocess test coverage
Test the synchronous communicate functions.
Matthias Clasen [Mon, 23 Dec 2013 17:07:11 +0000 (12:07 -0500)]
Improve GInitable test coverage
This just adds a bit more variety to the uses of GInitiable
in other tests.
Jasper St. Pierre [Thu, 19 Sep 2013 19:41:09 +0000 (15:41 -0400)]
gobject.py: Simplify or_join_array
Jasper St. Pierre [Thu, 19 Sep 2013 19:24:16 +0000 (15:24 -0400)]
gobject.py: Simplify and reduce code a bit
Jasper St. Pierre [Thu, 19 Sep 2013 18:59:44 +0000 (14:59 -0400)]
gobject.py: Remove old hack for stripping IA__ symbols
We don't use IA__ symbols anymore; they've been replaced with -Bsymbolic
Jasper St. Pierre [Thu, 19 Sep 2013 15:55:47 +0000 (11:55 -0400)]
gobject.py: Fix indentation
Jasper St. Pierre [Tue, 31 Dec 2013 20:13:06 +0000 (15:13 -0500)]
codegen: direction defaults to "in"
Michael Catanzaro [Sun, 29 Dec 2013 20:20:13 +0000 (14:20 -0600)]
docs: fix a typo
Chun-wei Fan [Fri, 27 Dec 2013 04:25:18 +0000 (12:25 +0800)]
Visual Studio Projects: Cleanup Property Sheets
Make the projects include a single property sheet as necessary, which will
in turn include the other property sheet(s) as needed, so that we can avoid
warnings where we include the same property sheets twice in a single
project.
Also make the copying of pre-configured headers into custom build rules so
that they can be removed upon the clean command from the IDE and that they
can be re-copied if their counterpart *.h.win32 are updated.
Chun-wei Fan [Fri, 27 Dec 2013 02:50:35 +0000 (10:50 +0800)]
Visual Studio Projects: Use Unix Line Endings
...where possible, to make application of patches easier in the future.
The README.txt's and the .sln files are still in Windows/DOS line endings
as they need to be so.
Chun-wei Fan [Fri, 27 Dec 2013 02:32:01 +0000 (10:32 +0800)]
Visual Studio Property Sheets: Use Unix Line Endings
This makes it easier to apply patches in the future.
Antoine Jacoutot [Thu, 26 Dec 2013 10:03:45 +0000 (11:03 +0100)]
kqueue: fix a potential deadlock
In case an object is already monitored, we lock then return without
unlocking it which can then result in a self deadlock. So properly
unlock before returning.
https://bugzilla.gnome.org/show_bug.cgi?id=721074