mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[css2xpath] added test case and fix
This commit is contained in:
parent
b84cfb1360
commit
7cfca54b59
@ -296,6 +296,9 @@ class Translator
|
|||||||
selector = r->apply(selector);
|
selector = r->apply(selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string quotes("\"\"");
|
||||||
|
selector = preg_replace(quotes, "\"", selector);
|
||||||
|
|
||||||
return selector == "/" ? "/" : ("//" + selector);
|
return selector == "/" ? "/" : ("//" + selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,7 +490,8 @@ tests()
|
|||||||
{"input:disabled", "//input[@disabled]"},
|
{"input:disabled", "//input[@disabled]"},
|
||||||
|
|
||||||
{":empty", "//*[not(*) and not(normalize-space())]"},
|
{":empty", "//*[not(*) and not(normalize-space())]"},
|
||||||
{":root", "/"}
|
{":root", "/"},
|
||||||
|
{"meta[name=\"gaf\"]", "//meta[@name=\"gaf\"]"}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto t: provider)
|
for (auto t: provider)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user