perl-Glib r1102 - in trunk: . t
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-Glib r1102 - in trunk: . t
- Date: Sun, 1 Mar 2009 16:59:05 +0000 (UTC)
Author: tsch
Date: Sun Mar 1 16:59:05 2009
New Revision: 1102
URL: http://svn.gnome.org/viewvc/perl-Glib?rev=1102&view=rev
Log:
Add more tests for Glib::filename_to_uri. Patch by Kevin Ryde.
Modified:
trunk/ChangeLog
trunk/t/filename.t
Modified: trunk/t/filename.t
==============================================================================
--- trunk/t/filename.t (original)
+++ trunk/t/filename.t Sun Mar 1 16:59:05 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);
-
-my @info;
-ok(!!(@info = Glib->filename_from_uri($uri)));
-ok(!!(@info = Glib::filename_from_uri($uri)));
-ok(!!(@info = filename_from_uri($uri)));
-
+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);
+
+ @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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]