Philip Withnall
969eb835dc
gopenuriportal: Fix a use-after-free on an error path
...
`path` was used in building the error message after it had been freed.
Spotted by scan-build.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #1767
2022-04-28 11:22:33 +01:00
Philip Withnall
606bdcdb18
Merge branch 'main' into 'main'
...
Fix the annotation of g_utf8_strncpy()
See merge request GNOME/glib!2621
2022-04-26 10:23:27 +00:00
Hodong
797bcf3224
Fix the annotation of g_utf8_strncpy()
2022-04-26 18:54:57 +09:00
Sebastian Dröge
fa55f37a88
Merge branch 'log-writer-checks' into 'main'
...
gmessages: Error if g_log_set_writer_func() is called multiple times
See merge request GNOME/glib!2617
2022-04-26 07:41:56 +00:00
Philip Withnall
862e250eaa
Merge branch 'fixes_in_tests' into 'main'
...
Fixes in tests
See merge request GNOME/glib!2608
2022-04-25 17:30:54 +00:00
Philip Withnall
6dc7b100f5
Merge branch 'gbookmarkfile_tests' into 'main'
...
Expand tests on gbookmark file API
See merge request GNOME/glib!2610
2022-04-25 13:37:43 +00:00
Philip Withnall
dfb3517d37
gmessages: Error if g_log_set_writer_func() is called multiple times
...
Inspired by https://gitlab.gnome.org/GNOME/glib/-/issues/2638 .
This requires moving the tests to subprocesses, so that
`g_log_set_writer_func()` is only called once per process.
It also adds a test for the new error.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-25 12:38:59 +01:00
Philip Withnall
a44a0c07bd
Merge branch 'gtype-boxed-type-macro' into 'main'
...
docs: Expand G_DEFINE_BOXED_TYPE docs with more detailed example
See merge request GNOME/glib!2612
2022-04-25 10:39:27 +00:00
Logan Rathbone
3a4f0746f5
docs: Expand G_DEFINE_BOXED_TYPE docs with more detailed example
2022-04-25 10:39:27 +00:00
Philip Withnall
cc99d6ee97
Merge branch 'gio-windows' into 'main'
...
Meson: Fix gio-windows-2.0 override name
See merge request GNOME/glib!2615
2022-04-25 10:30:11 +00:00
Philip Withnall
231a4bb9cb
Merge branch 'update-inout-annotations' into 'main'
...
Add inout annotations for g_iconv
See merge request GNOME/glib!2614
2022-04-25 10:28:39 +00:00
Philip Withnall
7ab50b9e29
Merge branch 'gtestutils-add-stdlib' into 'main'
...
gtestutils: Include stdlib.h for exit function
See merge request GNOME/glib!2613
2022-04-25 10:27:15 +00:00
Xavier Claessens
199ff2a841
Meson: Fix gio-windows-2.0 override name
...
The override name must match the pkgconfig name.
2022-04-24 21:29:26 -04:00
TestingPlant
39378b2581
Add inout annotations for g_iconv
2022-04-24 19:15:53 +00:00
Bruce Cowan
444fc6ccda
Update British English translation
...
(cherry picked from commit 82feda1ccf
)
2022-04-24 10:31:01 +00:00
Biswapriyo Nath
3c841f18c1
gtestutils: Include stdlib.h for exit function
...
This fixes warning: implicit declaration of function 'exit'
2022-04-23 14:02:10 +05:30
Milo Ivir
497aba96f1
Update Croatian translation
2022-04-20 17:46:52 +00:00
Emmanuel Fleury
6eddfefbfc
Expand tests on gbookmark file API
2022-04-19 16:38:41 +02:00
Ask Hjorth Larsen
d147c36bc6
Updated Danish translation
2022-04-18 19:25:00 +02:00
Emmanuel Fleury
b5c162635c
Fix spelling mistake in filename when unlinking it after the test.
2022-04-17 08:08:30 +02:00
Emmanuel Fleury
9ed0dc5583
Clean the file "iochannel-test-outfile" after the test test_small_writes()
2022-04-17 08:08:30 +02:00
Emmanuel Fleury
8901898da2
Cleaning file 'filename' after the test in glib/tests/fileutils.c
2022-04-17 08:08:23 +02:00
Enrico Nicoletto
15d6558ea2
Update Brazilian Portuguese translation
2022-04-15 17:07:22 +00:00
Philip Withnall
d987146fe1
Merge branch 'w32-tests' into 'main'
...
Fix test suite on Windows
See merge request GNOME/glib!2449
2022-04-14 12:16:19 +00:00
Marc-André Lureau
e9f46d3529
gio/tests: fix socket /socket/credentials/unix_socketpair on win32
...
When I enabled unix socketpair test on win32, I left the existing
g_close(fds[1]), but _g_win32_socketpair() returns native sockets
descriptors that must be closed with closesocket() on win32.
Let GSocket handle the socket pair cleanup.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-14 15:38:47 +04:00
Marc-André Lureau
89539d9ae0
gio/tests: GStatBuf.st_size is 64 bits on win64
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-14 15:38:47 +04:00
Marc-André Lureau
ae1cccaa0a
glib/gstdio: simplify GStatBuf macro condition for win64
...
As noted by Charlie Barto: "both mingw64 and msvc define _WIN64 in
64-bit mode, and both are LLP64, and both have struct _stat64 defined
the same way."
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2449#note_1372190
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-14 15:38:47 +04:00
Marc-André Lureau
f82f4776c0
tests: fix protocol test on win32
...
The pipe must be closed, or the child PID watch doesn't get triggered.
We should remove the message callback source on EOF, as EOF during main
loop run will reach a bad assert in the callback.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-14 15:38:47 +04:00
Philip Withnall
a072c84d95
Merge branch 'gdate-no-dst' into 'main'
...
GDate: Fix tests on Windows on certain locales
See merge request GNOME/glib!2600
2022-04-13 21:12:46 +00:00
Chun-wei Fan
a8f1058d3b
glib/tests/date.c: Fix 2-digit year test
...
...for certain Windows locales, since the formats accepted for
g_date_set_parse() will vary depending on the current system locale. For
instance, g_date_set_parse(gdate, "dd/mm/yy") is accepted on locales such
as zh-HK (Chinese (Hong Kong SAR)) but is rejected on zh-TW (Chinese
(Taiwan)).
One can tell from the "date format" settings in the Windows system
control panel whether there is a "dd/MM/YYYY" or "dd/MM/YY" option from the
drop-down list of date formats to display for the locale, which will indicate
whether g_date_set_parse(gdate, "dd/mm/yy") is accepted, which is true for
zh-HK but is not true for zh-TW.
If g_date_set_parse(gdate, "dd/mm/yy") is not accepted, try again with
g_date_set_parse(gdate, "yy/mm/dd") thereafter for the 2-digit-year tests.
2022-04-13 00:02:57 +08:00
Chun-wei Fan
697d3112b0
gdate.c: Use standard name if no daylight saving exists
...
We should normally have a standard name for the time zone even if we don't
have daylight saving in the time zone, so use the standard name also when
GetTimeZoneInformation() returns TIME_ZONE_ID_UNKNOWN[1][2].
[1]: https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation
[2]: https://docs.microsoft.com/zh-tw/windows/win32/api/timezoneapi/nf-timezoneapi-settimezoneinformation
2022-04-12 23:43:16 +08:00
Philip Withnall
fd79c8742b
Merge branch 'onceinit_test' into 'main'
...
Move tests/onceinit.c to glib/tests/onceinit.c
See merge request GNOME/glib!2601
2022-04-12 12:00:27 +00:00
Simon McVittie
bb04fdc013
Merge branch 'wip/pwithnall/fix-bsd-spawn-test' into 'main'
...
tests: Make a string comparison on an error string more relaxed
See merge request GNOME/glib!2597
2022-04-11 15:16:20 +00:00
Emmanuel Fleury
49ecdd1dba
Move tests/onceinit.c to glib/tests/onceinit.c
...
Related to issue #1434
2022-04-11 15:26:40 +02:00
Emmanuel Fleury
91dddb0641
Convert onceinit.c to glib test framework
2022-04-11 15:26:33 +02:00
Aleksandr Melman
382244631c
Update Russian translation
2022-04-09 15:34:12 +00:00
Yuri Chornoivan
51c7215c50
Update Ukrainian translation
2022-04-08 11:43:26 +00:00
Philip Withnall
3515170461
tests: Make a string comparison on an error string more relaxed
...
It currently fails on FreeBSD with:
```
Bail out! GLib:ERROR:../glib/tests/spawn-test.c:111:test_spawn_basics: assertion failed (erroutput == "sort: cannot read: non-existing-file.txt: No such file or directory\n"): ("sort: No such file or directory\n" == "sort: cannot read: non-existing-file.txt: No such file or directory\n")
```
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-08 12:25:59 +01:00
Philip Withnall
690e64afef
Merge branch 'unicode-normalize-test' into 'main'
...
Move test tests/unicode-normalize.c to glib/tests/
See merge request GNOME/glib!2586
2022-04-08 10:54:57 +00:00
Philip Withnall
be96ea9222
Merge branch 'wip/format_size_value_units' into 'main'
...
gutils: Add flags to g_format_size_full() to return only value or only units
See merge request GNOME/glib!2545
2022-04-08 10:54:45 +00:00
Philip Withnall
900b945988
Merge branch 'spawn_test' into 'main'
...
Move tests/spawn-test.c -> glib/tests/spawn-test.c
See merge request GNOME/glib!2575
2022-04-08 10:38:36 +00:00
Milan Crha
05a8ef6647
gutils: Add flags to g_format_size_full() to return only value or only units
...
This allows to split the formatted size into the value and into the units,
when can be shown differently in the UI.
Relate to https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1391
2022-04-08 11:36:03 +01:00
Charles Monzat
b9cbb61563
Update French translation
2022-04-08 10:21:58 +00:00
Emmanuel Fleury
b25eb3808d
Move unicode-normalize test from tests/ to glib/tests/
...
Helps issue #1434
2022-04-08 11:27:13 +02:00
Emmanuel Fleury
2c37b92dfa
Enable and convert tests/unicode-normalize.c to glib test framework
2022-04-08 11:24:43 +02:00
Fran Dieguez
8e5c72953b
Update Galician translation
2022-04-07 21:36:07 +00:00
Emmanuel Fleury
762ed2e82b
Move tests/spawn-test.c -> glib/tests/spawn-test.c
...
Related to issue #1434
2022-04-07 18:36:45 +02:00
Emmanuel Fleury
5a7a69bd99
Convert tests/spawn-test.c to glib test framework
2022-04-07 18:36:14 +02:00
Philip Withnall
a7aa029a11
Merge branch 'dup-socket' into 'main'
...
gio/tests: DuplicateHandle() is inappropriate for SOCKET
See merge request GNOME/glib!2592
2022-04-07 11:22:55 +00:00
Marc-André Lureau
2a925f273b
gio/tests: DuplicateHandle() is inappropriate for SOCKET
2022-04-07 11:22:55 +00:00