aboutsummaryrefslogtreecommitdiffstats
path: root/tests/autocomplete.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-09-20 17:42:04 +0000
committerRichard Worth <rdworth@gmail.com>2008-09-20 17:42:04 +0000
commit77cea8f36476e4195fac38bd57fecd70d642b24d (patch)
tree06d03e1e2d0810aa311a0051d7157c90b849e39a /tests/autocomplete.js
parent057d3c677eefe6c6406d1344359a77a864eb1d66 (diff)
downloadjquery-ui-77cea8f36476e4195fac38bd57fecd70d642b24d.tar.gz
jquery-ui-77cea8f36476e4195fac38bd57fecd70d642b24d.zip
set svn:eol-style to native
Diffstat (limited to 'tests/autocomplete.js')
-rw-r--r--tests/autocomplete.js102
1 files changed, 51 insertions, 51 deletions
diff --git a/tests/autocomplete.js b/tests/autocomplete.js
index 2196e96f9..ae75a9617 100644
--- a/tests/autocomplete.js
+++ b/tests/autocomplete.js
@@ -1,51 +1,51 @@
-test("init", function() {
- expect(6);
-
- el = $("#autocomplete").autocomplete();
- ok(true, '.autocomplete() called on element');
-
- $([]).autocomplete();
- ok(true, '.autocomplete() called on empty collection');
-
- $("<input/>").autocomplete();
- ok(true, '.autocomplete() called on disconnected DOMElement');
-
- $("<input/>").autocomplete().autocomplete("foo");
- ok(true, 'arbitrary method called after init');
-
- $("<input/>").autocomplete().data("foo.autocomplete");
- ok(true, 'arbitrary option getter after init');
-
- $("<input/>").autocomplete().data("foo.autocomplete", "bar");
- ok(true, 'arbitrary option setter after init');
-});
-
-test("destroy", function() {
- expect(6);
-
- $("#autocomplete").autocomplete().autocomplete("destroy");
- ok(true, '.autocomplete("destroy") called on element');
-
- $([]).autocomplete().autocomplete("destroy");
- ok(true, '.autocomplete("destroy") called on empty collection');
-
- $("<input/>").autocomplete().autocomplete("destroy");
- ok(true, '.autocomplete("destroy") called on disconnected DOMElement');
-
- $("<input/>").autocomplete().autocomplete("destroy").autocomplete("foo");
- ok(true, 'arbitrary method called after destroy');
-
- $("<input/>").autocomplete().autocomplete("destroy").data("foo.autocomplete");
- ok(true, 'arbitrary option getter after destroy');
-
- $("<input/>").autocomplete().autocomplete("destroy").data("foo.autocomplete", "bar");
- ok(true, 'arbitrary option setter after destroy');
-});
-
-
-test("highlighter", function() {
- equals( jQuery.Autocompleter.defaults.highlight("Peter", "Pe"), "<strong>Pe</strong>ter" );
- equals( jQuery.Autocompleter.defaults.highlight("Peter <em>&lt;Pan&gt;</em>", "Pe"), "<strong>Pe</strong>ter <em>&lt;Pan&gt;</em>" );
- equals( jQuery.Autocompleter.defaults.highlight("Peter <em>&lt;Pan&gt;</em>", "a"), "Peter <em>&lt;P<strong>a</strong>n&gt;</em>" );
- equals( jQuery.Autocompleter.defaults.highlight("Peter <em>(&lt;Pan&gt;)</em>", "(&lt;P"), "Peter <em><strong>(&lt;P</strong>an&gt;)</em>" );
-});
+test("init", function() {
+ expect(6);
+
+ el = $("#autocomplete").autocomplete();
+ ok(true, '.autocomplete() called on element');
+
+ $([]).autocomplete();
+ ok(true, '.autocomplete() called on empty collection');
+
+ $("<input/>").autocomplete();
+ ok(true, '.autocomplete() called on disconnected DOMElement');
+
+ $("<input/>").autocomplete().autocomplete("foo");
+ ok(true, 'arbitrary method called after init');
+
+ $("<input/>").autocomplete().data("foo.autocomplete");
+ ok(true, 'arbitrary option getter after init');
+
+ $("<input/>").autocomplete().data("foo.autocomplete", "bar");
+ ok(true, 'arbitrary option setter after init');
+});
+
+test("destroy", function() {
+ expect(6);
+
+ $("#autocomplete").autocomplete().autocomplete("destroy");
+ ok(true, '.autocomplete("destroy") called on element');
+
+ $([]).autocomplete().autocomplete("destroy");
+ ok(true, '.autocomplete("destroy") called on empty collection');
+
+ $("<input/>").autocomplete().autocomplete("destroy");
+ ok(true, '.autocomplete("destroy") called on disconnected DOMElement');
+
+ $("<input/>").autocomplete().autocomplete("destroy").autocomplete("foo");
+ ok(true, 'arbitrary method called after destroy');
+
+ $("<input/>").autocomplete().autocomplete("destroy").data("foo.autocomplete");
+ ok(true, 'arbitrary option getter after destroy');
+
+ $("<input/>").autocomplete().autocomplete("destroy").data("foo.autocomplete", "bar");
+ ok(true, 'arbitrary option setter after destroy');
+});
+
+
+test("highlighter", function() {
+ equals( jQuery.Autocompleter.defaults.highlight("Peter", "Pe"), "<strong>Pe</strong>ter" );
+ equals( jQuery.Autocompleter.defaults.highlight("Peter <em>&lt;Pan&gt;</em>", "Pe"), "<strong>Pe</strong>ter <em>&lt;Pan&gt;</em>" );
+ equals( jQuery.Autocompleter.defaults.highlight("Peter <em>&lt;Pan&gt;</em>", "a"), "Peter <em>&lt;P<strong>a</strong>n&gt;</em>" );
+ equals( jQuery.Autocompleter.defaults.highlight("Peter <em>(&lt;Pan&gt;)</em>", "(&lt;P"), "Peter <em><strong>(&lt;P</strong>an&gt;)</em>" );
+});