File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/org/opensolaris/opengrok/web
test/org/opensolaris/opengrok/web Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ public Iterator<Script> iterator() {
202
202
* @return true if script was added; false otherwise
203
203
*/
204
204
public boolean addScript (String contextPath , String scriptName ) {
205
- contextPath = contextPath == null || contextPath .isEmpty () ? "" : contextPath + "/" ;
205
+ contextPath = contextPath == null || contextPath .isEmpty () ? "/ " : contextPath + "/" ;
206
206
if (SCRIPTS .containsKey (scriptName )) {
207
207
this .addScript (
208
208
// put the context path end append the script path
Original file line number Diff line number Diff line change 22
22
*/
23
23
package org .opensolaris .opengrok .web ;
24
24
25
+ import static org .junit .Assert .assertEquals ;
26
+ import static org .junit .Assert .assertTrue ;
27
+ import static org .junit .Assert .fail ;
28
+
25
29
import java .util .Map .Entry ;
30
+
26
31
import org .junit .Before ;
27
32
import org .junit .Test ;
28
33
import org .opensolaris .opengrok .web .Scripts .Script ;
29
34
30
- import static org .junit .Assert .assertEquals ;
31
- import static org .junit .Assert .assertTrue ;
32
- import static org .junit .Assert .fail ;
33
-
34
35
/**
35
36
*
36
37
* @author Krystof Tulinger
@@ -123,11 +124,11 @@ public void testLookup() {
123
124
continue ;
124
125
}
125
126
assertTrue (scripts .toHtml () + " must contain <script type=\" text/javascript\" "
126
- + " src=\" " + s .getValue ().getScriptData () + "\" "
127
+ + " src=\" / " + s .getValue ().getScriptData () + "\" "
127
128
+ " data-priority=\" " + s .getValue ().getPriority () + "\" ></script>" ,
128
129
scripts .toHtml ()
129
130
.contains ("<script type=\" text/javascript\" "
130
- + " src=\" " + s .getValue ().getScriptData () + "\" "
131
+ + " src=\" / " + s .getValue ().getScriptData () + "\" "
131
132
+ " data-priority=\" " + s .getValue ().getPriority () + "\" ></script>" ));
132
133
}
133
134
}
You can’t perform that action at this time.
0 commit comments