Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
4259b02c
Commit
4259b02c
authored
Feb 22, 2007
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test case for bug #986.
parent
bb0ce155
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
selectorTest.js
src/selector/selectorTest.js
+4
-3
No files found.
src/selector/selectorTest.js
View file @
4259b02c
...
@@ -11,12 +11,12 @@ test("expressions - element", function() {
...
@@ -11,12 +11,12 @@ test("expressions - element", function() {
});
});
test
(
"expressions - id"
,
function
()
{
test
(
"expressions - id"
,
function
()
{
expect
(
1
0
);
expect
(
1
1
);
t
(
"ID Selector"
,
"#body"
,
[
"body"
]
);
t
(
"ID Selector"
,
"#body"
,
[
"body"
]
);
t
(
"ID Selector w/ Element"
,
"body#body"
,
[
"body"
]
);
t
(
"ID Selector w/ Element"
,
"body#body"
,
[
"body"
]
);
t
(
"ID Selector w/ Element"
,
"ul#first"
,
[]
);
t
(
"ID Selector w/ Element"
,
"ul#first"
,
[]
);
t
(
"ID selector with existing ID descendant"
,
"#firstp #simon1"
,
[
"simon1"
]
);
t
(
"ID selector with existing ID descendant"
,
"#firstp #simon1"
,
[
"simon1"
]
);
t
(
"ID selector with non-exist
ing
descendant"
,
"#firstp #foobar"
,
[]
);
t
(
"ID selector with non-exist
ant
descendant"
,
"#firstp #foobar"
,
[]
);
t
(
"ID Selector, child ID present"
,
"#form > #radio1"
,
[
"radio1"
]
);
// bug #267
t
(
"ID Selector, child ID present"
,
"#form > #radio1"
,
[
"radio1"
]
);
// bug #267
t
(
"ID Selector, not an ancestor ID"
,
"#form #first"
,
[]
);
t
(
"ID Selector, not an ancestor ID"
,
"#form #first"
,
[]
);
...
@@ -25,6 +25,7 @@ test("expressions - id", function() {
...
@@ -25,6 +25,7 @@ test("expressions - id", function() {
t
(
"All Children of ID"
,
"#foo/*"
,
[
"sndp"
,
"en"
,
"sap"
]
);
t
(
"All Children of ID"
,
"#foo/*"
,
[
"sndp"
,
"en"
,
"sap"
]
);
t
(
"All Children of ID with no children"
,
"#firstUL/*"
,
[]
);
t
(
"All Children of ID with no children"
,
"#firstUL/*"
,
[]
);
t
(
"ID selector with non-existant ancestor"
,
"#asdfasdf #foobar"
,
[]
);
});
});
...
@@ -146,4 +147,4 @@ test("expressions - basic xpath", function() {
...
@@ -146,4 +147,4 @@ test("expressions - basic xpath", function() {
$
(
"#foo"
).
each
(
function
()
{
$
(
"#foo"
).
each
(
function
()
{
isSet
(
$
(
"/p"
,
this
).
get
(),
q
(
"sndp"
,
"en"
,
"sap"
),
"Check XPath context"
);
isSet
(
$
(
"/p"
,
this
).
get
(),
q
(
"sndp"
,
"en"
,
"sap"
),
"Check XPath context"
);
});
});
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment