Commit Graph

14766 Commits

Author SHA1 Message Date
Jasper St. Pierre
33f81cc509 tests/keyfile: Fix build 2014-01-04 01:40:27 -05:00
Chun-wei Fan
589aed9383 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
2014-01-04 10:44:17 +08:00
Chun-wei Fan
3fd6edab66 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
2014-01-04 10:42:28 +08:00
Michael Catanzaro
6448f87552 docs: fix two typos 2014-01-02 19:40:47 -06:00
Ryan Lortie
1867fc210f 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
2014-01-02 20:38:40 -05:00
Rafael Ferreira
23ec1b9aca Updated Brazilian Portuguese translation 2014-01-02 22:08:14 -02:00
Matthias Clasen
2b289cc565 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.
2014-01-02 13:36:37 -05:00
Ryan Lortie
c09cfc1c8a 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.
2014-01-02 12:54:12 -05:00
Ryan Lortie
51b3dd7332 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
2014-01-02 10:08:55 -05:00
Ryan Lortie
8976175ba9 gsettings: tweak test for last commit
The last commit changed the behaviour of child objects of delayed
GSettings.  Adjust the testcase accordingly.
2014-01-02 01:55:07 -05:00
Ryan Lortie
c7636ce64b 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
2014-01-02 01:50:40 -05:00
Matthias Clasen
d25b655bf5 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.
2014-01-01 23:28:23 -05:00
Matthias Clasen
d91023fb4c Drop locale-dependent timeval tests 2014-01-01 22:39:32 -05:00
Matthias Clasen
11ddb843b9 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.
2014-01-01 22:30:24 -05:00
Matthias Clasen
dba1ae12a8 Avoid a compiler warning 2014-01-01 22:01:15 -05:00
Matthias Clasen
6106e38c8e Make timeval tests independent of the environment
Some of the tested formats are locale-dependent, so unset
the TZ environment variable before testing them.
2014-01-01 21:41:16 -05:00
Chun-wei Fan
cda4080af0 MSVC 2012 Projects: Rename a Property Sheet
Forgot to update the property sheet file name from the Visual Studio 2010
update... Sorry!
2014-01-02 09:54:18 +08:00
Ryan Lortie
76584e7ae3 Fix races in unix signal dispatch
Fix some races introduced in be2c7b83c4
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
2014-01-01 19:19:59 -05:00
Colin Walters
97d9138f6c gio/tests: Fix usage of BUILT_SOURCES 2014-01-01 19:05:34 -05:00
Yosef Or Boczko
52cefa239d Fix doc build 2014-01-02 01:40:26 +02:00
Matthias Clasen
f9f7ad2557 Improve gutils.c test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
3de604d438 Improve GDate test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
5e6d86877d Improve GIOChannel test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
5ec36cd02a Improve hostutils test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
baceea9582 Improve GVariant test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
ec0d6d7812 Test stdio wrappers 2014-01-01 17:59:22 -05:00
Matthias Clasen
93dad4808e Trivial typo fix 2014-01-01 17:59:22 -05:00
Matthias Clasen
90aa4ed0a0 Improve charset test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
4f0a13effc Add tests for g_malloc 2014-01-01 17:59:22 -05:00
Matthias Clasen
58cdf0b474 Drop memory-related trap variables
These are just more lo-tech conditional breakpoint wannabes.
Debuggers can be trusted to support conditional breakpoints
nowadays.
2014-01-01 17:59:22 -05:00
Matthias Clasen
6d3b83a8c1 Improve GAsyncQueue test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
9a2c8d89c7 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.
2014-01-01 17:59:22 -05:00
Matthias Clasen
32e0499c56 Add tests for g_spaced_primes_closest 2014-01-01 17:59:22 -05:00
Matthias Clasen
4989cb4dde Improve GOptionContext test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
d6bd36c699 Improve GBookmarkFile test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
14359e17c9 GBookmarkFile: Streamline error handling a bit 2014-01-01 17:59:22 -05:00
Matthias Clasen
228a2c82f6 GBookmarkFile: Remove dead code
The icon element is actually parsed further up, and this
case is never hit, so remove it.
2014-01-01 17:59:22 -05:00
Matthias Clasen
0f746070d8 Make a bookmark testfile roundtrippable
This will be used in new tests in the following commit.
2014-01-01 17:59:22 -05:00
Matthias Clasen
95f13ded92 Trivial formatting fixes 2014-01-01 17:59:21 -05:00
Matthias Clasen
d264d32d3b Improve glib-unix test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
6814f7ebd9 Improve GHashTable test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
95d4856760 Add a test for g_markup_parse_context_get_element_stack 2014-01-01 17:59:21 -05:00
Matthias Clasen
27e352985b 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.
2014-01-01 17:59:21 -05:00
Matthias Clasen
680c348bb4 Add missing includes
config.h needs to be included in every source file, first.
2014-01-01 17:59:21 -05:00
Matthias Clasen
cc8c1541c9 Improve mainloop test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
24d992f8a1 Add tests for GTimer and GTimeVal 2014-01-01 17:59:21 -05:00
Matthias Clasen
2ded47e955 Improve GTree test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
6e23e6c641 Improve logging test coverage 2014-01-01 17:59:21 -05:00
Matthias Clasen
cdb14a194e Improve testing test coverage
In particular, test the just-fixed g_test_trap_reached_timeout.
2014-01-01 17:59:21 -05:00
Matthias Clasen
3343bc3385 Fix g_test_trap_reached_timeout
The function was returning the opposite of what the
documentation says.
2014-01-01 17:59:21 -05:00