Skip to content

Commit 5257fc5

Browse files
authored
Remove unneeded injected test (#393)
1 parent a296493 commit 5257fc5

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/main/java/org/jvnet/hudson/test/JellyTestSuiteBuilder.java

-13
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ private static class JellyCheck extends TestCase {
101101
protected void runTest() throws Exception {
102102
jct.createContext().compileScript(jelly);
103103
Document dom = new SAXReader().read(jelly);
104-
checkLabelFor(dom);
105104
if (requirePI) {
106105
ProcessingInstruction pi = dom.processingInstruction("jelly");
107106
if (pi==null || !pi.getText().contains("escape-by-default"))
@@ -111,18 +110,6 @@ protected void runTest() throws Exception {
111110
// TODO: what else can we check statically? use of taglibs?
112111
}
113112

114-
/**
115-
* Makes sure that <label for=...> is not used inside config.jelly nor global.jelly
116-
*/
117-
private void checkLabelFor(Document dom) {
118-
if (isConfigJelly() || isGlobalJelly()) {
119-
if (!dom.selectNodes("//label[@for]").isEmpty())
120-
throw new AssertionError("<label for=...> shouldn't be used because it doesn't work " +
121-
"when the configuration item is repeated. Use <label class=\"attach-previous\"> " +
122-
"to have your label attach to the previous DOM node instead.\nurl="+jelly);
123-
}
124-
}
125-
126113
private boolean isConfigJelly() {
127114
return jelly.toString().endsWith("/config.jelly");
128115
}

0 commit comments

Comments
 (0)