Bringing some selector tests back from Sizzle.
This commit is contained in:
parent
6114565ab5
commit
4151ddef9d
|
@ -53,10 +53,11 @@ if ( location.protocol != "file:" ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
test("broken", function() {
|
test("broken", function() {
|
||||||
expect(7);
|
expect(8);
|
||||||
function broken(name, selector) {
|
function broken(name, selector) {
|
||||||
try {
|
try {
|
||||||
jQuery(selector);
|
jQuery(selector);
|
||||||
|
ok( false, name + ": " + selector );
|
||||||
} catch(e){
|
} catch(e){
|
||||||
ok( typeof e === "string" && e.indexOf("Syntax error") >= 0,
|
ok( typeof e === "string" && e.indexOf("Syntax error") >= 0,
|
||||||
name + ": " + selector );
|
name + ": " + selector );
|
||||||
|
@ -70,6 +71,7 @@ test("broken", function() {
|
||||||
broken( "Broken Selector", "()", [] );
|
broken( "Broken Selector", "()", [] );
|
||||||
broken( "Broken Selector", "<>", [] );
|
broken( "Broken Selector", "<>", [] );
|
||||||
broken( "Broken Selector", "{}", [] );
|
broken( "Broken Selector", "{}", [] );
|
||||||
|
broken( "Doesn't exist", ":visble", [] );
|
||||||
});
|
});
|
||||||
|
|
||||||
test("id", function() {
|
test("id", function() {
|
||||||
|
|
Loading…
Reference in a new issue