Author: bernhard
Date: Tue Nov 11 05:55:44 2008
New Revision: 32536

Modified:
   trunk/languages/pipp/t/php/string.t

Log:
RT#60432: [PATCH]basename function implementation for pipp
add test for basename(). Courtesy of Jimmy Zhuo.


Modified: trunk/languages/pipp/t/php/string.t
==============================================================================
--- trunk/languages/pipp/t/php/string.t (original)
+++ trunk/languages/pipp/t/php/string.t Tue Nov 11 05:55:44 2008
@@ -24,7 +24,7 @@
 use FindBin;
 use lib "$FindBin::Bin/../../../../lib", "$FindBin::Bin/../../lib";
 
-use Test::More     tests => 14;
+use Test::More     tests => 15;
 use Parrot::Test;
 
 
@@ -44,6 +44,20 @@
 A
 OUTPUT
 
+language_output_is( 'Pipp', <<'CODE', <<'OUTPUT', 'basename' );
+<?php
+  echo basename('def.html'), "\n";
+  echo basename('abc/def.html'), "\n";
+  echo basename('abc/def.html', '.html'), "\n";
+  echo basename('abc/def.html.html', '.html'), "\n";
+?>
+CODE
+def.html
+def.html
+def
+def.html
+OUTPUT
+
 language_output_is( 'Pipp', <<'CODE', <<'OUTPUT', 'ltrim' );
 <?php
   echo ltrim('  abc'), "\n";

Reply via email to