Add ARM files
[dh-make-perl] / dev / arm / libperl-critic-perl / libperl-critic-perl-1.088 / t / CodeLayout / RequireTrailingCommas.run
diff --git a/dev/arm/libperl-critic-perl/libperl-critic-perl-1.088/t/CodeLayout/RequireTrailingCommas.run b/dev/arm/libperl-critic-perl/libperl-critic-perl-1.088/t/CodeLayout/RequireTrailingCommas.run
new file mode 100644 (file)
index 0000000..5fa52e3
--- /dev/null
@@ -0,0 +1,122 @@
+## name Basic passing
+## failures 0
+## cut
+
+($foo,
+ $bar,
+ $baz
+);
+@list = ($foo, $bar, $baz);
+@list = some_function($foo, $bar, $baz);
+@list = ($baz);
+@list = ();
+
+@list = (
+);
+
+@list = ($baz
+);
+
+@list = ($baz
+       );
+
+# not a straight assignment
+@list = ((1,2,3),(
+ 1,
+ 2,
+ 3
+));
+
+#-----------------------------------------------------------------------------
+
+## name Basic failure
+## failures 3
+## cut
+
+@list = ($foo, 
+        $bar, 
+        $baz);
+
+@list = ($foo, 
+        $bar, 
+        $baz
+       );
+
+@list = ($foo, 
+        $bar, 
+        $baz
+);
+
+#-----------------------------------------------------------------------------
+
+## name List assignment
+## failures 0
+## cut
+
+@list = ($foo, 
+        $bar, 
+        $baz,);
+
+@list = ($foo, 
+        $bar, 
+        $baz,
+);
+
+@list = ($foo, 
+        $bar, 
+        $baz,
+       );
+
+#-----------------------------------------------------------------------------
+
+## name Conditionals and mathematical precedence
+## failures 0
+## cut
+
+$foo = ( 1 > 2 ?
+         $baz  :
+         $nuts );
+
+$bar = ( $condition1
+         && (    $condition2
+              || $condition3 )
+       );
+
+
+# These were reported as false-positives.
+# See http://rt.cpan.org/Ticket/Display.html?id=18297
+
+$median = ( $times[ int $array_size / 2 ] +
+            $times[(int $array_size / 2) - 1 ]) / 2;
+
+$median = ( $times[ int $array_size / 2 ] +
+            $times[ int $array_size / 2  - 1 ]) / 2;
+
+#-----------------------------------------------------------------------------
+
+## name code coverage
+## failures 1
+## cut
+
+@list = ($foo,
+         $bar,
+         $baz --
+         );
+
+#-----------------------------------------------------------------------------
+
+##############################################################################
+#      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/CodeLayout/RequireTrailingCommas.run $
+#     $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
+#   $Author: clonezone $
+# $Revision: 2187 $
+##############################################################################
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 78
+#   indent-tabs-mode: nil
+#   c-indentation-style: bsd
+# End:
+# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :