mvhub-dev team mailing list archive
-
mvhub-dev team
-
Mailing list archive
-
Message #00276
[Branch ~mvhub-commit/mvhub/trunk] Rev 406: ran perltidy
------------------------------------------------------------
revno: 406
committer: Dan MacNeil <dan@xxxxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-06-13 13:00:50 -0400
message:
ran perltidy
modified:
lib-mvhub/lib/MVHub/Utils.pm
lib-mvhub/t/Utils/undelimit_field.t
--
lp:mvhub
https://code.launchpad.net/~mvhub-commit/mvhub/trunk
Your team MVHub Developers is subscribed to branch lp:mvhub.
To unsubscribe from this branch go to https://code.launchpad.net/~mvhub-commit/mvhub/trunk/+edit-subscription
=== modified file 'lib-mvhub/lib/MVHub/Utils.pm'
--- lib-mvhub/lib/MVHub/Utils.pm 2010-06-08 23:25:35 +0000
+++ lib-mvhub/lib/MVHub/Utils.pm 2010-06-13 17:00:50 +0000
@@ -142,8 +142,8 @@
my $value = shift;
return $value if !defined $value;
- # fix problems caused by trailing DELEM
- $value=~s/(.*)!DELIM!$/$1/;
+ # fix problems caused by trailing DELEM
+ $value =~ s/(.*)!DELIM!$/$1/;
my $FIELD_DELIMITER = '!DELIM!';
=== modified file 'lib-mvhub/t/Utils/undelimit_field.t'
--- lib-mvhub/t/Utils/undelimit_field.t 2010-06-08 23:28:13 +0000
+++ lib-mvhub/t/Utils/undelimit_field.t 2010-06-13 17:00:50 +0000
@@ -4,57 +4,58 @@
# $Source$
use strict;
+
# use Test::More tests => 4 +1; # +1 for NoWarnings;
-use Test::More tests => 6 +1; # +1 for NoWarnings;
+use Test::More tests => 6 + 1; # +1 for NoWarnings;
use Test::NoWarnings;
use MVHub::Utils qw/undelimit_field/;
-my ( $in, $out, $test_name ,$got,$expected);
+my ( $in, $out, $test_name, $got, $expected );
######
$test_name = 'input is not defined';
-$in=undef;
-$expected=undef;
-$got=undelimit_field($in);
-is ($got,$expected,$test_name);
+$in = undef;
+$expected = undef;
+$got = undelimit_field($in);
+is( $got, $expected, $test_name );
######
$test_name = 'input has no elements';
-$in="";
-$expected="";
-$got=undelimit_field($in);
-is ($got,$expected,$test_name);
+$in = "";
+$expected = "";
+$got = undelimit_field($in);
+is( $got, $expected, $test_name );
######
$test_name = 'input > 1 element returned array ref';
-$in='a!DELIM! b!DELIM!';
-$got=undelimit_field($in);
-ok(ref $got eq 'ARRAY',$test_name);
+$in = 'a!DELIM! b!DELIM!';
+$got = undelimit_field($in);
+ok( ref $got eq 'ARRAY', $test_name );
#####
$test_name = 'input has 1 element and no !DELIM!';
-$in="a";
-$expected="a";
-$got=undelimit_field($in);
-is ($got,$expected,$test_name);
+$in = "a";
+$expected = "a";
+$got = undelimit_field($in);
+is( $got, $expected, $test_name );
######
$test_name = 'input has 2 element with (1) !DELIM!';
-$in='a!DELIM!b';
-$got=undelimit_field($in);
-$expected = ['a','b'];
-is_deeply($got,$expected,$test_name);
+$in = 'a!DELIM!b';
+$got = undelimit_field($in);
+$expected = [ 'a', 'b' ];
+is_deeply( $got, $expected, $test_name );
######
$test_name = 'input has 1 element with (1) !DELIM!';
-$in='a!DELIM!';
-$got=undelimit_field($in);
+$in = 'a!DELIM!';
+$got = undelimit_field($in);
$expected = 'a';
-is($got,$expected,$test_name);
+is( $got, $expected, $test_name );