Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac5f7cd

Browse files
authored
Tests: Port changes from Sizzle
Refjquery/sizzle#450Closesgh-4464
1 parentdf6a7f7 commitac5f7cd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎test/unit/selector.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ QUnit.test( "broken selectors throw", function( assert ) {
221221
.appendTo("#qunit-fixture");
222222

223223
broken("Attribute equals non-value","input[name=]");
224-
broken("Attribute equals unquoted non-identifer","input[name=foo.baz]");
225-
broken("Attribute equals unquoted non-identifer","input[name=foo[baz]]");
224+
broken("Attribute equals unquoted non-identifier","input[name=foo.baz]");
225+
broken("Attribute equals unquoted non-identifier","input[name=foo[baz]]");
226226
broken("Attribute equals bad string","input[name=''double-quoted'']");
227227
broken("Attribute equals bad string","input[name='apostrophe'd']");
228228
});
@@ -638,7 +638,7 @@ QUnit.test( "attributes - hyphen-prefix matches", function( assert ) {
638638
});
639639

640640
QUnit.test("attributes - special characters",function(assert){
641-
assert.expect(14);
641+
assert.expect(16);
642642

643643
varattrbad;
644644
vardiv=document.createElement("div");
@@ -656,6 +656,7 @@ QUnit.test( "attributes - special characters", function( assert ) {
656656
"<input type='hidden' id='attrbad_space' name='foo bar'/>"+
657657
"<input type='hidden' id='attrbad_dot' value='2' name='foo.baz'/>"+
658658
"<input type='hidden' id='attrbad_brackets' value='2' name='foo[baz]'/>"+
659+
"<input type='hidden' id='attrbad_leading_digits' name='agent' value='007'/>"+
659660
"<input type='hidden' id='attrbad_injection' data-attr='foo_baz&#39;]'/>"+
660661
"<input type='hidden' id='attrbad_quote' data-attr='&#39;'/>"+
661662
"<input type='hidden' id='attrbad_backslash' data-attr='&#92;'/>"+
@@ -678,6 +679,13 @@ QUnit.test( "attributes - special characters", function( assert ) {
678679
q("attrbad_injection"),
679680
"string containing quote and right bracket");
680681

682+
assert.deepEqual(jQuery.find("input[value=\\30 \\30\\37 ]",null,null,attrbad),
683+
q("attrbad_leading_digits"),
684+
"identifier containing escaped leading digits with whitespace termination");
685+
assert.deepEqual(jQuery.find("input[value=\\00003007]",null,null,attrbad),
686+
q("attrbad_leading_digits"),
687+
"identifier containing escaped leading digits without whitespace termination");
688+
681689
assert.deepEqual(jQuery.find("input[data-attr='\\'']",null,null,attrbad),
682690
q("attrbad_quote"),
683691
"string containing quote");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp