r31716 - in /branches/upstream/libglib-perl/current: ChangeLog GBookmarkFile.xs GBoxed.xs GClosure.xs GSignal.xs GType.xs GenPod.pm Glib.pm META.yml Makefile.PL NEWS README t/7.t t/filename.t t/h.t
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Sun Mar 8 21:51:30 UTC 2009
Author: ryan52-guest
Date: Sun Mar 8 21:51:27 2009
New Revision: 31716
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31716
Log:
[svn-upgrade] Integrating new upstream version, libglib-perl (1.214)
Modified:
branches/upstream/libglib-perl/current/ChangeLog
branches/upstream/libglib-perl/current/GBookmarkFile.xs
branches/upstream/libglib-perl/current/GBoxed.xs
branches/upstream/libglib-perl/current/GClosure.xs
branches/upstream/libglib-perl/current/GSignal.xs
branches/upstream/libglib-perl/current/GType.xs
branches/upstream/libglib-perl/current/GenPod.pm
branches/upstream/libglib-perl/current/Glib.pm
branches/upstream/libglib-perl/current/META.yml
branches/upstream/libglib-perl/current/Makefile.PL
branches/upstream/libglib-perl/current/NEWS
branches/upstream/libglib-perl/current/README
branches/upstream/libglib-perl/current/t/7.t
branches/upstream/libglib-perl/current/t/filename.t
branches/upstream/libglib-perl/current/t/h.t
Modified: branches/upstream/libglib-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/ChangeLog?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/ChangeLog (original)
+++ branches/upstream/libglib-perl/current/ChangeLog Sun Mar 8 21:51:27 2009
@@ -1,3 +1,74 @@
+2009-03-08 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * Glib.pm
+ * NEWS
+ * README: Unstable release 1.214.
+
+2009-03-08 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * GClosure.xs (gperl_callback_invoke): Fix a giant leak by
+ properly unsetting all GValues used for the callback arguments.
+ Patch by Kevin Ryde.
+
+2009-03-08 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * GenPod.pm (xsub_to_pod): Don't wrap the argument types of xsubs
+ with a superfluous pair of '=over' and '=back'.
+
+2009-03-08 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * GenPod.pm (podify_enums_and_flags): Don't generate 'ENUMS AND
+ FLAGS' entries for Glib::Enum and Glib::Flags since they don't
+ have values anyway.
+
+2009-03-01 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * t/7.t
+ * GSignal.xs (gperl_signal_connect): Don't leak the GClosure
+ object when an invalid signal name is passed in. Patch by
+ Kevin Ryde.
+
+2009-03-01 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * GType.xs (gperl_fundamental_type_from_obj): Check the SV for
+ definedness before passing it to SvRV. This fixes a test failure
+ on MSWin32 in t/c.t.
+
+2009-03-01 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * t/filename.t: Add more tests for Glib::filename_to_uri. Patch
+ by Kevin Ryde.
+
+2009-02-22 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * GBoxed.xs
+ * GType.xs: Fix errors reported by podchecker.
+
+2009-02-21 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * Makefile.PL: Tell the CPAN indexer to ignore the package 'MY'
+ used by Glib::MakeHelper.
+
+2009-02-21 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * GenPod.pm (xsdoc2pod): Instead of relying on one final '=cut',
+ close every opened POD paragraph separately. This fixes POD
+ errors that occurred when '=for position COPYRIGHT' was used.
+ Original patch by Ryan Niebur.
+
+2009-02-18 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * GBookmarkFile.xs: Don't document Glib::BookmarkFile::set_added,
+ set_modified, and set_visited as functions; they're methods.
+
+ * t/h.t: Test Glib::BookmarkFile::set_added, set_modified, and
+ set_visited and their associated getters.
+
+2009-02-18 Torsten Schoenfeld <kaffeetisch at gmx.de>
+
+ * Glib.pm: Use an '=encoding utf8' directive for the AUTHORS POD
+ section so that non-ASCII characters are handled correctly.
+
2009-02-13 Torsten Schoenfeld <kaffeetisch at gmx.de>
* Glib.pm
Modified: branches/upstream/libglib-perl/current/GBookmarkFile.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/GBookmarkFile.xs?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/GBookmarkFile.xs (original)
+++ branches/upstream/libglib-perl/current/GBookmarkFile.xs Sun Mar 8 21:51:27 2009
@@ -689,17 +689,17 @@
OUTPUT:
RETVAL
-=for apidoc Glib::BookmarkFile::set_added __function__
+=for apidoc Glib::BookmarkFile::set_added
Sets the time the bookmark for $uri was added.
If no bookmark for $uri is found one is created.
=cut
-=for apidoc Glib::BookmarkFile::set_modified __function__
+=for apidoc Glib::BookmarkFile::set_modified
Sets the time the bookmark for $uri was last modified.
If no bookmark for $uri is found one is created.
=cut
-=for apidoc Glib::BookmarkFile::set_visited __function__
+=for apidoc Glib::BookmarkFile::set_visited
Sets the time the bookmark for $uri was last visited.
If no bookmark for $uri is found one is created.
=cut
Modified: branches/upstream/libglib-perl/current/GBoxed.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/GBoxed.xs?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/GBoxed.xs (original)
+++ branches/upstream/libglib-perl/current/GBoxed.xs Sun Mar 8 21:51:27 2009
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Id: GBoxed.xs 1072 2009-02-05 13:57:30Z tsch $
+ * $Id: GBoxed.xs 1101 2009-02-22 16:10:49Z tsch $
*/
=head2 GBoxed
@@ -46,7 +46,7 @@
has already been done for you at this point). if own is true, the wrapper
is responsible for freeing the object; if it is false, some other code
owns the object and you must NOT free it.
-
+
typedef SV* (*GPerlBoxedWrapFunc) (GType gtype,
const char * package,
gpointer boxed,
Modified: branches/upstream/libglib-perl/current/GClosure.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/GClosure.xs?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/GClosure.xs (original)
+++ branches/upstream/libglib-perl/current/GClosure.xs Sun Mar 8 21:51:27 2009
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the full
- * list)
+ * Copyright (C) 2003-2009 by the gtk2-perl team (see the file AUTHORS for the
+ * full list)
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Id: GClosure.xs 1080 2009-02-05 16:28:33Z tsch $
+ * $Id: GClosure.xs 1107 2009-03-08 18:33:31Z tsch $
*/
=head2 GClosure / GPerlClosure
@@ -366,6 +366,16 @@
if (callback->n_params > 0) {
int i;
+ /* Crib note: must g_value_unset() even when asking for
+ * G_VALUE_NOCOPY_CONTENTS. A GObject is always
+ * g_object_ref()ed for storage in a GValue, even under
+ * G_VALUE_NOCOPY_CONTENTS (see code in
+ * g_value_object_collect_value()). Always reffing in
+ * G_VALUE_COLLECT is in fact the recommended behaviour for
+ * all ref-counted types (see the GTypeValueTable docs,
+ * apparently to ensure objects remain alive for the
+ * duration of a g_signal_emit_valist()).
+ */
for (i = 0 ; i < callback->n_params ; i++) {
gchar * error = NULL;
GValue v = {0, };
@@ -391,6 +401,7 @@
croak ("%s", SvPV_nolen (errstr));
}
sv = gperl_sv_from_value (&v);
+ g_value_unset (&v);
if (!sv) {
/* this should be very rare, too. */
PUTBACK;
Modified: branches/upstream/libglib-perl/current/GSignal.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/GSignal.xs?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/GSignal.xs (original)
+++ branches/upstream/libglib-perl/current/GSignal.xs Sun Mar 8 21:51:27 2009
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2003-2004 by the gtk2-perl team (see the file AUTHORS for
- * the full list)
+ * Copyright (C) 2003-2004, 2009 by the gtk2-perl team (see the file AUTHORS
+ * for the full list)
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Id: GSignal.xs 1063 2009-02-02 20:09:34Z tsch $
+ * $Id: GSignal.xs 1104 2009-03-01 17:26:01Z tsch $
*/
=head2 GSignal
@@ -270,6 +270,7 @@
GObject * object;
GPerlClosure * closure;
GClosureMarshal marshaller = NULL;
+ gulong id;
object = gperl_get_object (instance);
@@ -292,16 +293,19 @@
marshaller);
/* after is true only if we're called as signal_connect_after */
- closure->id =
- g_signal_connect_closure (object,
+ id = g_signal_connect_closure (object,
detailed_signal,
(GClosure*) closure,
flags & G_CONNECT_AFTER);
- if (closure->id > 0)
+ if (id > 0) {
+ closure->id = id;
remember_closure (closure);
-
- return ((GPerlClosure*)closure)->id;
+ } else {
+ /* not connected, usually bad detailed_signal name */
+ g_closure_unref ((GClosure*) closure);
+ }
+ return id;
}
/*
Modified: branches/upstream/libglib-perl/current/GType.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/GType.xs?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/GType.xs (original)
+++ branches/upstream/libglib-perl/current/GType.xs Sun Mar 8 21:51:27 2009
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Id: GType.xs 1079 2009-02-05 16:12:34Z tsch $
+ * $Id: GType.xs 1103 2009-03-01 17:03:05Z tsch $
*/
=head2 GType / GEnum / GFlags
@@ -240,6 +240,8 @@
{
SV *obj;
const char *package;
+ if (!gperl_sv_is_defined (objref))
+ return G_TYPE_NONE; /* ref is not defined */
obj = SvRV(objref);
if (obj == NULL)
return G_TYPE_NONE; /* ref is not a reference */
@@ -2513,7 +2515,7 @@
This returns the package names of the ancestral types in reverse order, with
the root of the tree at the end of the list.
-See also L<list_interfaces ()|list = Glib::Type-E<gt>list_interfaces ($package)>.
+See also L<list_interfaces ()|/"list = Glib::Type-E<gt>B<list_interfaces> ($package)">.
=cut
void
Modified: branches/upstream/libglib-perl/current/GenPod.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/GenPod.pm?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/GenPod.pm (original)
+++ branches/upstream/libglib-perl/current/GenPod.pm Sun Mar 8 21:51:27 2009
@@ -272,9 +272,12 @@
blurb => $pkgdata->{blurb},
};
+ # podify_pods() always returns proper POD with a =cut at the
+ # end. But all the other =head1 below need a closing =cut.
+
print "=head1 NAME\n\n$package";
print ' - '.$pkgdata->{blurb} if (exists ($pkgdata->{blurb}));
- print "\n\n";
+ print "\n\n=cut\n\n";
# pods , position
$ret = podify_pods ($pkgdata->{pods}, 'SYNOPSIS');
@@ -285,13 +288,13 @@
my $parents;
($ret, $parents) = podify_ancestors ($package);
- print "=head1 HIERARCHY\n\n$ret" if ($ret);
+ print "=head1 HIERARCHY\n\n$ret\n\n=cut\n\n" if ($ret);
$ret = podify_pods ($pkgdata->{pods}, 'post_hierarchy');
print "$ret\n\n" if ($ret);
$ret = podify_interfaces ($package);
- print "=head1 INTERFACES\n\n$ret" if ($ret);
+ print "=head1 INTERFACES\n\n$ret\n\n=cut\n\n" if ($ret);
$ret = podify_pods ($pkgdata->{pods}, 'post_interfaces');
print "$ret\n\n" if ($ret);
@@ -300,28 +303,28 @@
print "$ret\n\n" if ($ret);
$ret = podify_deprecated_by ($package, @{ $pkgdata->{deprecated_bys} });
- print "\n=head1 DEPRECATION WARNING\n\n$ret" if ($ret);
+ print "\n=head1 DEPRECATION WARNING\n\n$ret\n\n=cut\n\n" if ($ret);
$ret = podify_methods ($package, $pkgdata->{xsubs});
- print "\n=head1 METHODS\n\n$ret" if ($ret);
+ print "\n=head1 METHODS\n\n$ret\n\n=cut\n\n" if ($ret);
$ret = podify_pods ($pkgdata->{pods}, 'post_methods');
print "$ret\n\n" if ($ret);
$ret = podify_properties ($package);
- print "\n=head1 PROPERTIES\n\n$ret" if ($ret);
+ print "\n=head1 PROPERTIES\n\n$ret\n\n=cut\n\n" if ($ret);
$ret = podify_pods ($pkgdata->{pods}, 'post_properties');
print "$ret\n\n" if ($ret);
$ret = podify_signals ($package);
- print "\n=head1 SIGNALS\n\n$ret" if ($ret);
+ print "\n=head1 SIGNALS\n\n$ret\n\n=cut\n\n" if ($ret);
$ret = podify_pods ($pkgdata->{pods}, 'post_signals');
print "$ret\n\n" if ($ret);
$ret = podify_enums_and_flags ($pkgdata, $package);
- print "\n=head1 ENUMS AND FLAGS\n\n$ret" if ($ret);
+ print "\n=head1 ENUMS AND FLAGS\n\n$ret\n\n=cut\n\n" if ($ret);
$ret = podify_pods ($pkgdata->{pods}, 'post_enums');
print "$ret\n\n" if ($ret);
@@ -342,7 +345,7 @@
$pkgdata->{see_alsos}
? @{ $pkgdata->{see_alsos} }
: ());
- print "\n=head1 SEE ALSO\n\n$ret" if ($ret);
+ print "\n=head1 SEE ALSO\n\n$ret\n\n=cut\n\n" if ($ret);
}
$ret = podify_pods ($pkgdata->{pods}, 'COPYRIGHT');
@@ -355,10 +358,8 @@
{
# use normal copyright system
$ret = get_copyright ();
- print "\n=head1 COPYRIGHT\n\n$ret" if ($ret);
- }
-
- print "\n=cut\n\n";
+ print "\n=head1 COPYRIGHT\n\n$ret\n\n=cut\n\n" if ($ret);
+ }
close POD;
}
@@ -679,6 +680,8 @@
foreach (sort keys %types)
{
s/\s.*//;
+
+ next if $_ eq 'Glib::Enum' || $_ eq 'Glib::Flags';
my $values_pod = podify_values ($_);
@@ -1178,8 +1181,6 @@
$str .= "$sigprefix $_\n\n";
}
- $str .= "=over\n\n";
-
#
# list all the arg types.
#
@@ -1239,8 +1240,6 @@
$str .= "Since: $lib_name $version_conditions{$lib_name}\n\n";
}
- $str .= "=back\n\n";
-
$str
}
Modified: branches/upstream/libglib-perl/current/Glib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/Glib.pm?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/Glib.pm (original)
+++ branches/upstream/libglib-perl/current/Glib.pm Sun Mar 8 21:51:27 2009
@@ -15,7 +15,7 @@
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
#
-# $Id: Glib.pm 1088 2009-02-13 14:40:47Z tsch $
+# $Id: Glib.pm 1108 2009-03-08 19:37:53Z tsch $
#
package Glib;
@@ -66,7 +66,7 @@
our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
$EXPORT_TAGS{all} = \@EXPORT_OK;
-our $VERSION = '1.213';
+our $VERSION = '1.214';
sub dl_load_flags { $^O eq 'darwin' ? 0x00 : 0x01 }
@@ -650,6 +650,8 @@
=head1 AUTHORS
+=encoding utf8
+
muppet, E<lt>scott at asofyet dot orgE<gt>, who borrowed heavily from the work
of Göran Thyni, E<lt>gthyni at kirra dot netE<gt> and Guillaume Cottenceau
E<lt>gc at mandrakesoft dot comE<gt> on the first gtk2-perl module, and from
Modified: branches/upstream/libglib-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/META.yml?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/META.yml (original)
+++ branches/upstream/libglib-perl/current/META.yml Sun Mar 8 21:51:27 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Glib
-version: 1.213
+version: 1.214
abstract: Perl wrappers for the GLib utility and Object libraries
author: []
license: unknown
@@ -19,6 +19,7 @@
files:
- xsapi.pod.head
- xsapi.pod.foot
+ package: MY
generated_by: ExtUtils::MakeMaker version 6.48
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
Modified: branches/upstream/libglib-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/Makefile.PL?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/Makefile.PL (original)
+++ branches/upstream/libglib-perl/current/Makefile.PL Sun Mar 8 21:51:27 2009
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.PL 1082 2009-02-05 17:00:08Z tsch $
+# $Id: Makefile.PL 1100 2009-02-21 13:55:17Z tsch $
#
BEGIN { require 5.008; }
@@ -154,9 +154,13 @@
FUNCLIST => \@exports,
DL_FUNCS => { Glib => [] },
- META_MERGE => {
+ META_MERGE => {
configure_requires => \%PREREQ_PM,
- no_index => { files => [qw/xsapi.pod.head xsapi.pod.foot/] } },
+ no_index => {
+ files => [qw/xsapi.pod.head xsapi.pod.foot/],
+ package => 'MY',
+ },
+ },
$glib ? $glib->get_makefile_vars : (),
);
Modified: branches/upstream/libglib-perl/current/NEWS
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/NEWS?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/NEWS (original)
+++ branches/upstream/libglib-perl/current/NEWS Sun Mar 8 21:51:27 2009
@@ -1,3 +1,10 @@
+Overview of changes in Glib 1.214
+=================================
+
+* Fix a leak in the handling of callback arguments.
+* Fix many errors and glitches in the POD generated by Glib::GenPod.
+* Fix some test suite issues and documentation glitches.
+
Overview of changes in Glib 1.213
=================================
Modified: branches/upstream/libglib-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/README?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/README (original)
+++ branches/upstream/libglib-perl/current/README Sun Mar 8 21:51:27 2009
@@ -1,4 +1,4 @@
-Glib version 1.213
+Glib version 1.214
==================
This module provides perl access to Glib and GLib's GObject libraries.
@@ -102,4 +102,4 @@
with this library; if not, write to the Free Software Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307 USA.
-# $Id: README 1088 2009-02-13 14:40:47Z tsch $
+# $Id: README 1108 2009-03-08 19:37:53Z tsch $
Modified: branches/upstream/libglib-perl/current/t/7.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/t/7.t?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/t/7.t (original)
+++ branches/upstream/libglib-perl/current/t/7.t Sun Mar 8 21:51:27 2009
@@ -21,7 +21,7 @@
use Test::More import => ['diag'];
-print "1..34\n";
+print "1..36\n";
sub ok($$;$) {
my($test, $num, $name) = @_;
@@ -269,16 +269,38 @@
$my->signal_connect_after (list_returner => sub { fail("shouldn't get here"); 0 });
pass(27);
print Dumper( $my->list_returner );
-}
-
-pass(34);
+
+
+ # Check that a signal_connect() of a non-existant signal name doesn't
+ # leak the subr passed to it, ie. doesn't keep it alive forever.
+ #
+ # Note $subr has to use $x or similar in its containing environment to be
+ # a closure. If not then it's treated as part of the mainline code and
+ # won't be gc'ed immediately -- or something like that.
+ {
+ my $x = 123;
+ my $subr = sub { return $x };
+
+ # handler to suppress the warning message from nosuchsignal
+ my $logid = Glib::Log->set_handler ('GLib-GObject', ['warning'], sub { });
+ my $sigid = $my->signal_connect ('nosuchsignal' => $subr);
+ Glib::Log->remove_handler ('GLib-GObject', $logid);
+
+ ok(! $sigid, 34, "'nosuchsignal' not connected");
+ require Scalar::Util;
+ Scalar::Util::weaken ($subr);
+ ok(! defined $subr, 35, "subr gc'ed after bad signal name");
+ }
+}
+
+pass(36);
__END__
-Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
+Copyright (C) 2003, 2009 by the gtk2-perl team (see the file AUTHORS for the
full list)
This library is free software; you can redistribute it and/or modify it under
Modified: branches/upstream/libglib-perl/current/t/filename.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/t/filename.t?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/t/filename.t (original)
+++ branches/upstream/libglib-perl/current/t/filename.t Sun Mar 8 21:51:27 2009
@@ -8,7 +8,7 @@
use strict;
use warnings;
use Glib qw(:functions);
-use Test::More tests => 24;
+use Test::More tests => 26;
my $filename = "test";
@@ -44,12 +44,21 @@
like(Glib->filename_from_uri($uri), $expected);
like(Glib::filename_from_uri($uri), $expected);
like(filename_from_uri($uri), $expected);
+like(filename_from_uri("file:///$filename"), $expected);
+{
+ # note in the return "localhost" is downgraded to undef on msdos, so don't
+ # check $ret[1] eq 'localhost'
+ my @ret;
+ @ret = Glib->filename_from_uri($uri);
+ like ($ret[0], $expected);
-my @info;
-ok(!!(@info = Glib->filename_from_uri($uri)));
-ok(!!(@info = Glib::filename_from_uri($uri)));
-ok(!!(@info = filename_from_uri($uri)));
+ @ret = filename_from_uri($uri);
+ like ($ret[0], $expected);
+ @ret = filename_from_uri("file:///$filename");
+ like ($ret[0], $expected);
+ is ($ret[1], undef);
+}
SKIP: {
skip "g_filename_display_name was added glib 2.6.0", 6
Modified: branches/upstream/libglib-perl/current/t/h.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libglib-perl/current/t/h.t?rev=31716&op=diff
==============================================================================
--- branches/upstream/libglib-perl/current/t/h.t (original)
+++ branches/upstream/libglib-perl/current/t/h.t Sun Mar 8 21:51:27 2009
@@ -4,7 +4,7 @@
use strict;
use warnings;
use Glib ':constants';
-use Test::More tests => 27;
+use Test::More tests => 30;
our $str = <<__EOB__
<?xml version="1.0" encoding="UTF-8"?>
@@ -122,6 +122,15 @@
$bookmark_file->remove_item($uris[0]);
is ($bookmark_file->get_size, 0, 'check_remove_item');
+
+ $bookmark_file->set_added($uri, $now);
+ is ($bookmark_file->get_added($uri), $now, 'check added accessors');
+
+ $bookmark_file->set_modified($uri, $now);
+ is ($bookmark_file->get_modified($uri), $now, 'check modified accessors');
+
+ $bookmark_file->set_visited($uri, $now);
+ is ($bookmark_file->get_visited($uri), $now, 'check visited accessors');
}
__END__
More information about the Pkg-perl-cvs-commits
mailing list