glib/gio/tests
Philip Withnall 42c9e8218b gio: Change content type of zero-sized files to application/x-zerosize
That’s what xdgmime uses for zero-sized files (see `XDG_MIME_TYPE_EMPTY`).

Historically, GLib explicitly used `text/plain` for empty files, to
ensure they would open in a text editor. But `text/plain` is not really
correct for an empty file: the content isn’t text because there is no
content. The file could eventually become something else when written
to.

Text editors which want to be opened for new, empty files should add
`application/x-zerosize` to their list of supported content types.

Users who want to set a handler for `application/x-zerosize` on their
desktop should use
```sh
gio mime application/x-zerosize  # to see the current handler
gio mime application/x-zerosize org.gnome.gedit.desktop  # to set it
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2777
2022-11-07 13:21:28 +00:00
..
cert-tests gtlscertificate: Add ability to load PKCS #12 encrypted files 2022-01-07 11:27:56 -06:00
de/LC_MESSAGES
desktop-files gdesktopappinfo: Fix validation of XDG_CURRENT_DESKTOP 2021-01-09 15:39:09 +01:00
gdbus-object-manager-example meson: Expose library build type as global variables 2022-10-31 14:08:31 +01:00
modules giomodules: g_io_module_* must always be exported 2022-10-13 20:53:56 -04:00
schema-tests
services meson: Set install_tag on installed tests files 2022-09-20 11:30:02 -04:00
static-link CI: Test static build on installed glib 2018-10-23 09:45:12 -04:00
thumbnails
x-content Correct shellcheck errors (and ignore world splitting when we want it) 2020-11-15 17:34:27 +01:00
.gitignore gdbus, tests: rename gdbus-unix-addresses test to gdbus-address-get-session 2019-03-12 21:53:43 +03:00
111_digit_test.gresource.xml glib-compile-resources: Fixes #1675 2019-02-20 10:38:29 +00:00
actions.c gio: Add some missing license and copyright headers 2022-07-05 12:30:46 +01:00
appinfo-test2.desktop.in tests: Avoid chdir() call at the start of appinfo tests 2018-12-17 17:16:03 +00:00
appinfo-test-actions.desktop tests/desktop-app-info: Use unique temporary paths for action files 2022-09-13 02:44:25 +02:00
appinfo-test-gnome.desktop.in tests: Avoid chdir() call at the start of appinfo tests 2018-12-17 17:16:03 +00:00
appinfo-test-notgnome.desktop.in tests: Avoid chdir() call at the start of appinfo tests 2018-12-17 17:16:03 +00:00
appinfo-test-static.desktop tests: Use static appinfo .desktop file when not launching 2018-12-17 17:16:04 +00:00
appinfo-test.c Normalize C source files to end with exactly one newline 2020-06-10 09:48:02 +01:00
appinfo-test.desktop.in tests: Don’t spawn test processes via the terminal in the appinfo test 2019-06-28 13:05:07 +01:00
appinfo.c desktop-app-info: Run test without display, they work with no issue 2022-10-25 14:31:02 +02:00
appmonitor.c tests: skip appmonitor test on win32 2022-03-18 00:16:14 +04:00
apps.c
async-close-output-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
async-splice-output-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
autoptr.c autoptr test: Use OS-dependent path separator 2019-02-13 08:49:42 +00:00
basic-application.c Fix several missing initializer warnings in gio/tests/basic-application.c 2021-04-29 12:40:05 +02:00
buffered-input-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
buffered-output-stream.c
cancellable.c Fix warnings in GCancellable test 2022-08-03 20:38:59 +02:00
codegen.py Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
contenttype.c Revert "gio, glib: Use G_OS_DARWIN for code that is for such environments" 2022-11-07 11:30:32 +00:00
contexts.c Fix several signedness warnings in gio/tests/contexts.c 2021-04-05 12:03:51 +02:00
converter-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
credentials.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
cxx.cpp Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
data-input-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
data-output-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
dbus-appinfo.c tests/dbus-appinfo: Add test case for flatpak opening an invalid file 2022-09-02 19:48:36 +02:00
dbus-launch.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
de.po
debugcontroller.c tests: Fix non-TAP output from debugcontroller test 2022-06-21 12:50:31 +01:00
defaultvalue.c gio/tests: Disable deprecation warnings where necessary 2022-09-21 11:19:31 +01:00
desktop-app-info.c tests: Reduce an unnecessary sleep from desktop-app-info test 2022-11-01 00:33:40 +00:00
echo-server.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
empty.txt gresource: Fix handling of zero-sized compressed resource entries 2020-11-14 19:03:18 +00:00
enums.xml.template
error.c gerror: Add an utility function to get the GIO Error from GFileError 2022-06-22 20:07:25 +02:00
fake-document-portal.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
fake-service-name.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
file-thumbnail.c tests/file-thumbnail: make it work with win32 paths 2022-10-17 10:43:59 +04:00
file.c gio: Change content type of zero-sized files to application/x-zerosize 2022-11-07 13:21:28 +00:00
fileattributematcher.c
filter-cat.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
filter-streams.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
g-file-info-filesystem-readonly.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
g-file-info.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
g-file.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
g-icon.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
gapplication-example-actions.c
gapplication-example-cmdline2.c
gapplication-example-cmdline3.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gapplication-example-cmdline4.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gapplication-example-cmdline.c
gapplication-example-dbushooks.c
gapplication-example-open.c
gapplication.c Introduce G_APPLICATION_DEFAULT_FLAGS 2022-07-25 22:30:22 +01:00
gdbus-address-get-session.c gtestutils: Add G_TEST_SUBPROCESS_DEFAULT, G_TEST_TRAP_DEFAULT 2022-06-23 10:47:13 +01:00
gdbus-addresses.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-auth.c gio: remove pointless use of g_unix_socket_address_abstract_names_supported with unix:tmpdir= 2022-10-21 22:09:06 +07:00
gdbus-bz627724.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-close-pending.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-connection-flush-helper.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-connection-flush.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-connection-loss.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-connection-slow.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-connection.c gdbus: Allow cross-namespace connections to Linux session and system buses 2022-07-24 14:07:02 +01:00
gdbus-daemon.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-error.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-example-export.c Fix missing initializer warning in gio/tests/gdbus-example-export.c 2021-04-15 10:19:29 +02:00
gdbus-example-objectmanager-client.c build: work around meson issue with too long filenames on Windows. Fixes #1556 2018-10-04 10:45:45 +02:00
gdbus-example-objectmanager-server.c GDBus: Use G_DBUS_METHOD_INVOCATION_HANDLED in method implementations 2020-10-01 16:32:50 +01:00
gdbus-example-own-name.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-example-peer.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-example-proxy-subclass.c Fix unused variable and remove finalize vfunc in gio/tests/gdbus-example-proxy-subclass.c 2022-04-04 17:39:59 +01:00
gdbus-example-server.c Fix missing initializer warning in gio/tests/gdbus-example-server.c 2021-04-23 10:43:05 +02:00
gdbus-example-subtree.c Fix several missing initializer warnings in gio/tests/gdbus-example-subtree.c 2021-04-23 10:43:05 +02:00
gdbus-example-unix-fd-client.c
gdbus-example-watch-name.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-example-watch-proxy.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
gdbus-exit-on-close.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-export.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-introspection.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-message.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-method-invocation.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-names.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-non-socket.c gtestutils: Add G_TEST_SUBPROCESS_DEFAULT, G_TEST_TRAP_DEFAULT 2022-06-23 10:47:13 +01:00
gdbus-overflow.c gio: remove pointless use of g_unix_socket_address_abstract_names_supported with unix:tmpdir= 2022-10-21 22:09:06 +07:00
gdbus-peer-object-manager.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-peer.c gio/tests/gdbus-peer: Unref cached property GVariant value 2022-09-02 21:21:34 +02:00
gdbus-proxy-threads.c gio/tests/gdbus-proxy-threads: Unref GVariant's that we own 2022-09-02 20:26:06 +02:00
gdbus-proxy-unique-name.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-proxy-well-known-name.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-proxy.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-sasl.c tests: Add a test for GDBusServer with various simulated clients 2022-07-18 19:39:41 +01:00
gdbus-serialization.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-server-auth.c Revert "gio, glib: Use G_OS_DARWIN for code that is for such environments" 2022-11-07 11:30:32 +00:00
gdbus-sessionbus.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-sessionbus.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
gdbus-test-codegen.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-test-fixture.c gio/tests: add a fake implementation of the document portal 2019-12-17 20:56:49 +08:00
gdbus-tests.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gdbus-tests.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
gdbus-testserver.c Fix missing initializer warning in gio/tests/gdbus-testserver.c 2021-04-15 10:19:29 +02:00
gdbus-threading.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gen-big-test-resource.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
gengiotypefuncs.py Fix some coding style issues in python tests pointed out by black and flake8 2022-06-28 11:19:21 +01:00
gio-du.c Fix set but unused parameter warning in gio/tests/gio-du.c 2021-11-17 14:40:38 +01:00
giomodule.c Revert "gio, glib: Use G_OS_DARWIN for code that is for such environments" 2022-11-07 11:30:32 +00:00
glistmodel.c Replace most GObject warnings with criticals 2022-08-09 13:18:47 -05:00
gmenumodel.c gio: remove pointless use of g_unix_socket_address_abstract_names_supported with unix:tmpdir= 2022-10-21 22:09:06 +07:00
gnotification-server.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gnotification-server.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
gnotification.c Introduce G_APPLICATION_DEFAULT_FLAGS 2022-07-25 22:30:22 +01:00
gschema-compile.c gtestutils: Add G_TEST_SUBPROCESS_DEFAULT, G_TEST_TRAP_DEFAULT 2022-06-23 10:47:13 +01:00
gsettings.c gtestutils: Add G_TEST_SUBPROCESS_DEFAULT, G_TEST_TRAP_DEFAULT 2022-06-23 10:47:13 +01:00
gsocketclient-slow.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gsubprocess-testprog.c Add tests for GSubprocess fd conflation issues 2021-12-14 13:47:31 -06:00
gsubprocess.c tests: Fix incorrect basename comparison in gsubprocess test 2022-06-27 15:02:55 +01:00
gtesttlsbackend.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gtesttlsbackend.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
gtlsconsoleinteraction.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
gtlsconsoleinteraction.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
httpd.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
inet-address.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
io-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
live-g-file.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
live-g-file.txt tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
max-version.c tests: Test that we can include all headers with an old MAX_VERSION 2022-10-27 14:50:48 +01:00
memory-input-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
memory-monitor-dbus.py.in gio: Fix conditions in memory-monitor test 2021-09-06 14:46:15 +02:00
memory-monitor-portal.py.in gio: Fix conditions in memory-monitor test 2021-09-06 14:46:15 +02:00
memory-monitor.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
memory-output-stream.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
memory-settings-backend.c Add tests for GMemorySettingsBackend and GNullSettingsBackend 2022-07-15 22:07:03 +02:00
meson.build gio: Create a sandbox checking function 2022-11-01 10:20:36 +00:00
mimeapps.c Fix signedness warning in gio/tests/mimeapps.c 2021-04-15 10:19:29 +02:00
mock-resolver.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
mock-resolver.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
mount-operation.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
network-address.c tests: Use g_assert_*() rather than g_assert() in network-address.c 2022-02-22 11:25:21 +00:00
network-monitor-race.c Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
network-monitor.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
null-settings-backend.c Add tests for GMemorySettingsBackend and GNullSettingsBackend 2022-07-15 22:07:03 +02:00
org.gtk.schemasourcecheck.gschema.xml gsettings: Resolve child schemas from the parent's schema source 2021-06-04 12:09:24 +00:00
org.gtk.test.dbusappinfo.desktop
org.gtk.test.dbusappinfo.flatpak.desktop gio/tests: add a test for document portal use when launching flatpaks 2019-12-17 20:59:22 +08:00
org.gtk.test.gschema.override.orig
org.gtk.test.gschema.xml.orig
permission.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
pollable.c tests: Fix defined-but-not-used variables if HAVE_OPENPTY is undefined 2022-06-07 19:12:46 +01:00
power-profile-monitor-dbus.py.in gio: Add GPowerProfileMonitor tests 2021-08-13 01:32:31 +02:00
power-profile-monitor-portal.py.in tests: Fix subsequent tests after first power-profile test failure 2021-09-06 18:57:06 +01:00
power-profile-monitor.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
proxy-test.c gproxyresolver: lookup_finish() should better parallel lookup_async() 2022-11-01 13:40:35 -05:00
proxy.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
readwrite.c Fix signedness warning in gio/tests/readwrite.c 2021-04-29 12:40:05 +02:00
resolver-parsing.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
resolver.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
resourceplugin.c giomodules: g_io_module_* must always be exported 2022-10-13 20:53:56 -04:00
resources.c Revert "gio, glib: Use G_OS_DARWIN for code that is for such environments" 2022-11-07 11:30:32 +00:00
sandbox.c gio: Create a sandbox checking function 2022-11-01 10:20:36 +00:00
send-data.c Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings 2021-05-13 20:16:46 +00:00
simple-async-result.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
simple-proxy.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
sleepy-stream.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
slow-connect-preload.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
socket-address.c
socket-client.c tests: NULL-initialise some variables to help scan-build 2022-06-07 11:04:25 +01:00
socket-common.c Fix signedness warning in gio/tests/socket-common.c 2021-04-23 10:43:05 +02:00
socket-listener.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
socket-server.c Fix global variable name hidden by local variables in gio/tests/socket-server.c 2022-04-01 15:10:50 +02:00
socket-service.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
socket.c tests: Fix non-TAP output from socket test 2022-06-21 12:50:31 +01:00
srvtarget.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
static-link.py Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
stream-rw_all.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
taptestrunner.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
task.c tests: Tweak the task tests 2022-11-01 11:48:52 +00:00
test1.overlay Add a test for resource overlays 2019-01-10 13:50:26 -05:00
test1.txt
test2.gresource.xml tree: Fix various typos and outdated terminology 2020-06-12 15:01:08 +01:00
test2.txt
test3.gresource.xml
test3.txt
test4.gresource.xml
test5.gresource.xml glib-compile-resources: Add external data option 2018-12-19 16:43:21 +00:00
test-codegen.xml gdbus-codegen: emit GUnixFDLists if an arg has type 'h' 2019-09-02 20:47:20 +01:00
test-io-stream.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
test-io-stream.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
test-pipe-unix.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
test-pipe-unix.h Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
test.gresource.xml gresource: Fix handling of zero-sized compressed resource entries 2020-11-14 19:03:18 +00:00
testenum.h
testfilemonitor.c tests: Add a test for GFileMonitor deadlocks 2022-05-31 12:24:13 +01:00
thumbnail-verification.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
tls-bindings.c gtestutils: Add G_TEST_SUBPROCESS_DEFAULT, G_TEST_TRAP_DEFAULT 2022-06-23 10:47:13 +01:00
tls-certificate.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
tls-database.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
tls-interaction.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
trash.c Add SPDX license headers for LGPL-2.1-or-later to various files 2022-06-01 12:44:23 +01:00
unix-fd.c gio/tests: add basic fd-list unit test to unix-fd 2022-05-17 17:34:06 +02:00
unix-mounts.c tests: Add SPDX license headers automatically 2022-05-18 09:20:07 +01:00
unix-streams.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
vfs.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
volumemonitor.c Normalize C source files to end with exactly one newline 2020-06-10 09:48:02 +01:00
win32-appinfo.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00
win32-streams.c Add a SPDX LicenseRef for the license historically used for tests 2022-11-02 12:34:19 +00:00