Commit Graph

19 Commits

Author SHA1 Message Date
Johan Dahlin
761424465a Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch


svn path=/trunk/; revision=7092
2008-06-22 15:10:51 +00:00
Kjartan Maraas
a629b3f02d Plug leaks reported by valgrind. Same. Same Same. Same. Same.
2006-02-23  Kjartan Maraas  <kmaraas@gnome.org>

	* tests/completion-test.c: (main): Plug leaks reported by
	valgrind.
	* tests/convert-test.c: (test_iconv_state), (test_one_half):
	Same.
	* tests/patterntest.c: (test_compilation): Same
	* tests/shell-test.c: (do_argv_test): Same.
	* tests/unicode-caseconv.c: (main): Same.
	* tests/uri-test.c: (run_to_uri_tests): Same.
2006-02-23 09:09:55 +00:00
Tor Lillqvist
7787e71d8b Minor simplification in safe_strcmp_filename(). 2005-08-01 19:25:37 +00:00
Tor Lillqvist
7aa2e37f5e Ugh, fix braino. 2005-08-01 19:23:10 +00:00
Tor Lillqvist
d5a989875b Make it pass on Win32. (from_uri_tests[]): Take into consideration that on
2005-08-01  Tor Lillqvist  <tml@novell.com>

	* tests/uri-test.c: Make it pass on Win32.
	(from_uri_tests[]): Take into consideration that on Win32 we don't
	return "localhost" hostnames.
	(safe_strcmp_filename): New function that considers slash and
	backslash equal on Win32.
	(run_roundtrip_tests): Use safe_strcmp_filename().
2005-08-01 19:17:35 +00:00
Matthias Clasen
7221f500f5 Make the tests silent on success.
2005-07-14  Matthias Clasen  <mclasen@redhat.com>

	* tests/spawn-test.c:
	* tests/uri-test.c:
	* tests/thread-test.c:
	* tests/queue-test.c:
	* tests/mainloop-test.c:
	* tests/iochannel-test.c:
	* tests/gio-test.c:
	* tests/child-test.c: Make the tests silent on success.
2005-07-14 05:20:14 +00:00
Matthias Clasen
8df27c8dd5 Add some uri list tests.c.
2004-10-22  Matthias Clasen  <mclasen@redhat.com>

	* tests/uri-test.c (run_uri_list_tests): Add some
	uri list tests.c.

	* glib/gconvert.h:
	* glib/gconvert.c (g_uri_list_extract_uris): New function to
	split a text/uri-list data into individual uris and strip comments.
2004-10-22 19:51:29 +00:00
Manish Singh
b54cccf6a8 move newline printing from run_from_uri_tests() to run_roundtrip_tests().
Sun Aug  1 13:19:18 2004  Manish Singh  <yosh@gimp.org>

        * tests/uri-test.c: move newline printing from run_from_uri_tests()
        to run_roundtrip_tests().
2004-08-01 20:21:02 +00:00
Matthias Clasen
0611985dd9 Don't validate for UTF-8 here. (#148420, Robert Ögren)
2004-07-30  Matthias Clasen  <mclasen@redhat.com>

	* glib/gconvert.c (g_unescape_uri_string): Don't validate
	for UTF-8 here.  (#148420, Robert Ögren)

	* tests/uri-test.c (run_roundtrip_tests): Add tests for
	roundtrip compatibility. Going from filename to uri and
	back should always give you the same filename back.
2004-07-30 19:00:01 +00:00
Federico Mena Quintero
ff8ade82ff Fix expected results (ha ha) for URIs that *should* have been invalid, or
2004-06-09  Federico Mena Quintero  <federico@ximian.com>

	* tests/uri-test.c (to_uri_tests): Fix expected results (ha ha)
	for URIs that *should* have been invalid, or viceversa.
	(from_uri_tests): Likewise.
2004-06-10 00:17:57 +00:00
Tor Lillqvist
9b4080611a glib/giowin32.c glib/gmain.c glib/gstrfuncs.c Decorating variable
2004-04-10  Tor Lillqvist  <tml@iki.fi>

	* glib/giowin32.c
	* glib/gmain.c
	* glib/gstrfuncs.c
	* glib/gthread.c: Decorating variable definitions with
	__declspec(dllexport) causes problems on Cygwin build, and isn't
	really needed for a native Win32 build with mingw or MSVC, so
	remove. (#138402, Roger Leigh)

	* glib/libcharset/localcharset.c: Use Win32-specific code also on
	Cygwin.
	* tests/uri-test.c: Don't assume that local filenames are in UTF-8
	on Cygwin, either. (#138412, Roger Leigh)
2004-04-10 01:55:57 +00:00
Matthias Clasen
306d5e2b6b Get rid of UNSAFE_DOS_PATH. (acceptable): Align with RFC2396. (#59653)
2003-03-30  Matthias Clasen  <maclas@gmx.de>

	* glib/gconvert.c (UnsafeCharacterSet): Get rid of
	UNSAFE_DOS_PATH.
	(acceptable): Align with RFC2396.  (#59653)

	* tests/uri-test.c: Adjust to the changes above.
2003-03-30 21:24:58 +00:00
Owen Taylor
d4407e38fa Include config.h so DISABLE_MEMPOOLS actually has an effect. (#96437,
Mon Nov  4 14:41:48 2002  Owen Taylor  <otaylor@redhat.com>

        * glib/gbsearcharray.c: Include config.h
        so DISABLE_MEMPOOLS actually has an effect.
        (#96437, Morten Welinder)

        * tests/uri-test.c: Include <config.h>

Mon Nov  4 14:42:36 2002  Owen Taylor  <otaylor@redhat.com>

        * gtype.c gsignal.c gvaluearray.c: Include config.h
        so DISABLE_MEMPOOLS actually has an effect.
        (#96437, Morten Welinder)

        * gsignal.c: Conditionalize definition of g_handler_ts
        on DISABLE_MEM_POOLS (#96437)

Mon Nov  4 14:45:24 2002  Owen Taylor  <otaylor@redhat.com>

        * gthread-posix.c gthread-solaris.c: Include <config.h>
2002-11-04 20:09:48 +00:00
Owen Taylor
88cec4d135 ed Feb 20 22:35:42 2002 Owen Taylor <otaylor@redhat.com>
Fixes from Miroslaw Dobrzanski-Neumann (#71963)

        * glib/giounix.c (g_io_channel_new_file): Fix trailing comma
        in enum.

        * configure.in: Check for unsetenv.

        * test/uri-test.c: Fall back to trying putenv(VARNAME) if
        unsetenv isn't present.
2002-02-21 03:54:34 +00:00
Darin Adler
4c9d538fc8 Make hostname parameter const char *. Added a new "ASCII must not be
* glib/gconvert.h: Make hostname parameter const char *.
	* glib/gconvert.c: (g_unescape_uri_string): Added a new
	"ASCII must not be escaped" feature, and some missing error
	checking.
	(is_escalphanum): New.
	(is_escalpha): New.
	(hostname_validate): New.
	(g_filename_from_uri): Don't allow hostnames to include
	escaped ASCII, validate hostnames with the new
	hostname_validate.
	(g_filename_to_uri): Validate hostnames with the new
	hostname_validate.

	* tests/uri-test.c: Updated tests to reflect the hostname
	validation changes above.

	* glib/gdate.c: (g_date_fill_parse_tokens): Remove the
	<ctype.h> include and do isdigit -> g_ascii_isdigit.
2002-02-08 19:57:35 +00:00
Tor Lillqvist
79d4ba9438 Not used on Windows, don't even compile it then.
2002-01-23  Tor Lillqvist  <tml@iki.fi>

	* glib/gconvert.c: (strdup_len): Not used on Windows, don't even
	compile it then.

	(acceptable): Improve comments for the _acceptable_ table: put
	each ASCII char above the hex number for it.

	(g_escape_file_uri): On Windows, turn backslashes in the file name
	into plain ("forward") slashes.

	(g_filename_from_uri): On Windows, don't return the hostname
	"localhost", because we can not be 100% sure it will be recognized
	in all cases anyway, so simpler to turn it into a null
	hostname.

	Change slashes in the filename into backslashes, as that is the
	more canonical separator.

	Recognize drive letters (either followed by a colon or a vertical
	bar, as used by some browsers), and if the filename part starts
	with a such, don't include any (back)slash.

	Don't drop any extra leading slash in the filename on Unix.

	(g_filename_to_uri): On Windows, if the hostname is "localhost",
	don't use it, for consistency with g_filename_from_uri().

	tests/uri-test.c: Change accordingly, so that all tests pass on
	Windows. Unix, too, I hope, though I couldn't check that now.

	(main): Unset the G_BROKEN_FILENAMES environment variable on Unix,
	as some tests require that filenames are in UTF-8. Is unsetenv()
	portable?

	These changes should fix bugs #59387, #59652, #59657 and #59658.
2002-01-23 00:05:30 +00:00
Alex Larsson
5c75cc9617 Convert G_CONVERT_ERROR_NOT_ABSOLUTE_FILE_URI and
2001-10-01  Alex Larsson  <alexl@redhat.com>

	* glib/gconvert.[ch]:
	Convert G_CONVERT_ERROR_NOT_ABSOLUTE_FILE_URI and
	G_CONVERT_ERROR_INVALID_URI to G_CONVERT_ERROR_BAD_URI.

	* tests/uri-test.c:
	Update tests
2001-10-01 20:40:05 +00:00
Darin Adler
ee2712c487 Updated name of error from G_CONVERT_ERROR_NOT_LOCAL_FILE to
* glib/gconvert.h:
	* glib/gconvert.c: (g_filename_from_uri):
	Updated name of error from G_CONVERT_ERROR_NOT_LOCAL_FILE to
	G_CONVERT_ERROR_NOT_ABSOLUTE_FILE_URI.

	* tests/.cvsignore:
	* tests/uri-test.c:
	Added a lot more test for the new URI functions, including a
	number that seem to indicate some minor bugs.
2001-08-27 18:01:08 +00:00
Alex Larsson
4e11203c54 New functions to convert between local pahtnames and file: uris.
2001-08-26  Alex Larsson  <alexl@redhat.com>

	* glib/gconvert.[ch] (g_filename_from_uri,
	g_filename_to_uri): New functions to convert
	between local pahtnames and file: uris.

	* tests/Makefile.am:
	* tests/uri-test.c:
	Tests for the new functions.
2001-08-26 21:39:47 +00:00