Martin Pitt
139c1ce988
gio/tests/contenttype: Call g_content_type_guess() with valid data len
...
g_content_type_guess() requires specifying a valid data length. Fixes a
segfault when running the test.
Also add an explicit check for this and return XDG_MIME_TYPE_UNKNOWN when
data_size is specified as -1, to avoid crashing.
https://bugzilla.gnome.org/show_bug.cgi?id=674452
2012-06-27 16:00:27 +02:00
Ryan Lortie
56ca8add10
contenttype test: don't pass -1 as length
...
g_content_type_guess() takes a gsize, not a gssize, and -1 does not mean
"I am passing a NULL terminated string".
2012-05-01 15:16:05 -07:00
Matthias Clasen
a8c869e945
contenttype: Improve test coverage
...
Excercise more parts of the guessing machinery.
These tests rely on the mime database being present.
2012-04-08 10:24:51 -04:00
Javier Jardón
ee044fd839
gio/tests: Use g_list_free_full() convenience function
2012-01-02 23:18:22 +01:00
Matthias Clasen
dea042b855
Misc test additions
2010-07-05 03:09:36 -04:00
Matthias Clasen
f90eb144d4
Add some more tests
2010-07-04 23:42:07 -04:00
Matthias Clasen
14db75381e
Add some contenttype tests
2010-07-04 22:27:01 -04:00