Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r55083 - in /trunk/yast2: VERSION library/types/src/String.ycp library/types/testsuite/tests/String.out library/types/testsuite/tests/String.ycp package/yast2.changes
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Tue, 27 Jan 2009 15:50:50 -0000
  • Message-id: <E1LRqDC-0002fD-Rl@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Tue Jan 27 16:50:50 2009
New Revision: 55083

URL: http://svn.opensuse.org/viewcvs/yast?rev=55083&view=rev
Log:
- - added String::StartsWith() function

Modified:
trunk/yast2/VERSION
trunk/yast2/library/types/src/String.ycp
trunk/yast2/library/types/testsuite/tests/String.out
trunk/yast2/library/types/testsuite/tests/String.ycp
trunk/yast2/package/yast2.changes

Modified: trunk/yast2/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=55083&r1=55082&r2=55083&view=diff
==============================================================================
--- trunk/yast2/VERSION (original)
+++ trunk/yast2/VERSION Tue Jan 27 16:50:50 2009
@@ -1 +1 @@
-2.18.2
+2.18.3

Modified: trunk/yast2/library/types/src/String.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/src/String.ycp?rev=55083&r1=55082&r2=55083&view=diff
==============================================================================
--- trunk/yast2/library/types/src/String.ycp (original)
+++ trunk/yast2/library/types/src/String.ycp Tue Jan 27 16:50:50 2009
@@ -1291,5 +1291,13 @@
return ret;
}

+/**
+ * Checks whether string str starts with test.
+ */
+global boolean StartsWith(string str, string test)
+{
+ return search(str, test) == 0;
+}
+
/* EOF */
}

Modified: trunk/yast2/library/types/testsuite/tests/String.out
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/testsuite/tests/String.out?rev=55083&r1=55082&r2=55083&view=diff
==============================================================================
--- trunk/yast2/library/types/testsuite/tests/String.out (original)
+++ trunk/yast2/library/types/testsuite/tests/String.out Tue Jan 27 16:50:50
2009
@@ -110,6 +110,11 @@
Dump Strings::EscapeTags
Return &lt;font size='2'&gt;&lt;b&gt;text &amp; another&lt;/b&gt;&lt;/font&gt;
Return 2 &gt; 1
+Dump String::StartsWith
+Return true
+Return true
+Return true
+Return false
Dump Strings::RemoveShortcut
Return Hello
Return Hello

Modified: trunk/yast2/library/types/testsuite/tests/String.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/testsuite/tests/String.ycp?rev=55083&r1=55082&r2=55083&view=diff
==============================================================================
--- trunk/yast2/library/types/testsuite/tests/String.ycp (original)
+++ trunk/yast2/library/types/testsuite/tests/String.ycp Tue Jan 27 16:50:50
2009
@@ -149,6 +149,12 @@
TEST(``(String::EscapeTags("<font size='2'><b>text & another</b></font>")),
[], nil);
TEST(``(String::EscapeTags("2 > 1")), [], nil);

+DUMP("String::StartsWith");
+TEST(``(String::StartsWith("hello", "hello")), [], nil);
+TEST(``(String::StartsWith("hello world", "hello")), [], nil);
+TEST(``(String::StartsWith("hello hello", "hello")), [], nil);
+TEST(``(String::StartsWith("hello", "hello world")), [], nil);
+
DUMP("Strings::RemoveShortcut");
TEST(``(String::RemoveShortcut("Hello")), [], nil);
TEST(``(String::RemoveShortcut("He&llo")), [], nil);

Modified: trunk/yast2/package/yast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=55083&r1=55082&r2=55083&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Tue Jan 27 16:50:50 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Jan 27 16:35:14 CET 2009 - aschnell@xxxxxxx
+
+- added String::StartsWith() function
+- 2.18.3
+
+-------------------------------------------------------------------
Mon Jan 26 14:09:34 CET 2009 - mzugec@xxxxxxx

- new Wizard::OpenCancelOKDialog() function

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages