[commit #11336] TiddlyWiki - added test for trim()

3 views
Skip to first unread message

s...@tiddlywiki.org

unread,
Dec 15, 2009, 8:10:51 AM12/15/09
to
http://trac.tiddlywiki.org/changeset/11336

MartinBudden
2009-12-15 05:10:51 -0800 (Tue, 15 Dec 2009)
34
TiddlyWiki - added test for trim()

---------------

U Trunk/core/test/js/Strings.js

---------------

Modified: Trunk/core/test/js/Strings.js
===================================================================
--- Trunk/core/test/js/Strings.js 2009-12-15 11:25:24 UTC (rev 11335)
+++ Trunk/core/test/js/Strings.js 2009-12-15 13:10:51 UTC (rev 11336)
@@ -13,6 +13,10 @@
expected = "abcdef";
ok(actual==expected,'String trim');

+ actual = " abc def ".trim();
+ expected = "abcdef";
+ ok(actual==expected,'String trim');
+
actual = "background-color".unDash();
expected = "backgroundColor";
ok(actual==expected,'String undash');

Tobias Beer

unread,
Dec 16, 2009, 11:33:23 AM12/16/09
to TiddlyWikiDev
Shouldn't...

> + expected = "abcdef";

rather be...

> + expected = "abc def";

?

I thought "trim" functions were generally used to trim "spaces" on
either side of a string, but not in the middle... or am I mistaken?

Martin Budden

unread,
Dec 17, 2009, 5:19:43 AM12/17/09
to tiddly...@googlegroups.com
Tobias,

you are correct. This was a typo on my part and has been corrected in
http://trac.tiddlywiki.org/changeset/11342


Martin

2009/12/16 Tobias Beer <beert...@googlemail.com>:

> --
>
> You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
> To post to this group, send email to tiddly...@googlegroups.com.
> To unsubscribe from this group, send email to tiddlywikide...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
>
>
>

Reply all
Reply to author
Forward
0 new messages