3 <script src="bogus/1/OpenLayers.js-foo"></script>
4 <script src="bogus/2/foo-OpenLayers.js"></script>
5 <script id="script" src="../lib/OpenLayers.js"></script>
6 <script type="text/javascript">
7 function test_OpenLayers(t) {
10 var script = document.getElementById("script");
12 t.eq(OpenLayers._getScriptLocation(), "../", "Script location correctly detected.");
13 script.setAttribute("src", "../lib/OpenLayers.js?foo");
14 t.eq(OpenLayers._getScriptLocation(), "../", "Script location with search string correctly detected.");
16 // now pretend we're using a built script
17 OpenLayers._scriptName = "OpenLayers.js";
18 t.eq(OpenLayers._getScriptLocation(), "../lib/", "not fooled by bogus paths");