[KSS-checkins] r50400 - in kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes: . tests
reebalazs at codespeak.net
reebalazs at codespeak.net
Sun Jan 6 17:19:43 CET 2008
Author: reebalazs
Date: Sun Jan 6 17:19:43 2008
New Revision: 50400
Modified:
kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/ (props changed)
kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js
Log:
Add ecma tests for providers with multiproperty
Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js (original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js Sun Jan 6 17:19:43 2008
@@ -981,7 +981,7 @@
};
this.testNormalProviderRejectsSelector = function() {
- // normal parameters do not accept selector
+ // normal parameters do not accept selector (in itself)
//
// This test can only run in development mode, pass otherwise.
if (! kukit.isDevelMode) {return;}
@@ -1181,6 +1181,83 @@
'Provider result type [selection] not allowed in the action definition [action-server]., at row 1, column 11');
};
+ this.testNormalProviderAcceptsValueAndSelector = function() {
+ // normal parameters accepts value and selector
+ //
+ // This test can only run in development mode, pass otherwise.
+ if (! kukit.isDevelMode) {return;}
+ //
+ var txt= "#id:click {\n"
+ + " action-client: log;\n"
+ + " log-message: kssAttr(blah) htmlid('id');\n"
+ + "}\n"
+ var cursor = new kukit.tk.Cursor(txt);
+ var parser = new kukit.kssp.Document(cursor, null, true);
+ this.assertEquals(parser.finished, true);
+ };
+
+ this.testNormalProviderAcceptsSelectorAndValue = function() {
+ // normal parameters accepts value and selector
+ //
+ // This test can only run in development mode, pass otherwise.
+ if (! kukit.isDevelMode) {return;}
+ //
+ var txt= "#id:click {\n"
+ + " action-client: log;\n"
+ + " log-message: htmlid('id') kssAttr(blah);\n"
+ + "}\n"
+ var cursor = new kukit.tk.Cursor(txt);
+ var parser = new kukit.kssp.Document(cursor, null, true);
+ this.assertEquals(parser.finished, true);
+ };
+
+ this.testNormalProviderAcceptsStringAndSelector = function() {
+ // normal parameters accepts string and selector
+ // although this does not make much sense... but it's allowed.
+ //
+ // This test can only run in development mode, pass otherwise.
+ if (! kukit.isDevelMode) {return;}
+ //
+ var txt= "#id:click {\n"
+ + " action-client: log;\n"
+ + " log-message: 'message' htmlid('id');\n"
+ + "}\n"
+ var cursor = new kukit.tk.Cursor(txt);
+ var parser = new kukit.kssp.Document(cursor, null, true);
+ this.assertEquals(parser.finished, true);
+ };
+
+ this.testNormalProviderAcceptsSelectorAndString = function() {
+ // normal parameters accepts selector and string
+ // although this does not make much sense... but it's allowed.
+ //
+ // This test can only run in development mode, pass otherwise.
+ if (! kukit.isDevelMode) {return;}
+ //
+ var txt= "#id:click {\n"
+ + " action-client: log;\n"
+ + " log-message: htmlid('id') 'message';\n"
+ + "}\n"
+ var cursor = new kukit.tk.Cursor(txt);
+ var parser = new kukit.kssp.Document(cursor, null, true);
+ this.assertEquals(parser.finished, true);
+ };
+
+ this.testNormalProviderAcceptsValueAndSelector = function() {
+ // normal parameters accepts value and selector
+ //
+ // This test can only run in development mode, pass otherwise.
+ if (! kukit.isDevelMode) {return;}
+ //
+ var txt= "#id:click {\n"
+ + " action-client: log;\n"
+ + " log-message: kssAttr(blah) htmlid('id');\n"
+ + "}\n"
+ var cursor = new kukit.tk.Cursor(txt);
+ var parser = new kukit.kssp.Document(cursor, null, true);
+ this.assertEquals(parser.finished, true);
+ };
+
};
kukit.KssParserValueProvidersCheckTestCase.prototype = new kukit.KssParserTestCaseBase;
More information about the Kukit-checkins
mailing list