svn commit: trunk/busybox/shell/ash_test/ash-vars

vda at busybox.net vda at busybox.net
Sat Apr 12 22:55:33 UTC 2008


Author: vda
Date: 2008-04-12 15:55:33 -0700 (Sat, 12 Apr 2008)
New Revision: 21722

Log:
ash: add testsuite entry for POSIX-mandated ${var#word} ${var##word}
${var%word} ${var%%word}



Added:
   trunk/busybox/shell/ash_test/ash-vars/var_posix1.right
   trunk/busybox/shell/ash_test/ash-vars/var_posix1.tests


Changeset:
Added: trunk/busybox/shell/ash_test/ash-vars/var_posix1.right
===================================================================
--- trunk/busybox/shell/ash_test/ash-vars/var_posix1.right	                        (rev 0)
+++ trunk/busybox/shell/ash_test/ash-vars/var_posix1.right	2008-04-12 22:55:33 UTC (rev 21722)
@@ -0,0 +1,10 @@
+abcdcd
+abcdcd
+abcdcd
+cdcd
+babcdcd
+ababcd
+ababcd
+ababcd
+abab
+ababcdc

Added: trunk/busybox/shell/ash_test/ash-vars/var_posix1.tests
===================================================================
--- trunk/busybox/shell/ash_test/ash-vars/var_posix1.tests	                        (rev 0)
+++ trunk/busybox/shell/ash_test/ash-vars/var_posix1.tests	2008-04-12 22:55:33 UTC (rev 21722)
@@ -0,0 +1,13 @@
+var=ababcdcd
+
+echo ${var#ab}
+echo ${var#a*b}
+echo ${var##ab}
+echo ${var##a*b}
+echo ${var#?}
+
+echo ${var%cd}
+echo ${var%c*d}
+echo ${var%%cd}
+echo ${var%%c*d}
+echo ${var%?}


Property changes on: trunk/busybox/shell/ash_test/ash-vars/var_posix1.tests
___________________________________________________________________
Name: svn:executable
   + *




More information about the busybox-cvs mailing list