Documentation and tests to close #259 .

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1605 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-10-05 19:31:00 +00:00
parent fee4d6f973
commit 3cf66a5779
2 changed files with 10 additions and 0 deletions

View File

@@ -479,7 +479,16 @@
resolution = OpenLayers.Util.getResolutionFromScale(scale);
t.eq(OpenLayers.Util.getScaleFromResolution(resolution), scale, "scale->resolution->scale works");
}
function test_14_Util_getImgLocation(t) {
t.plan(3);
OpenLayers.ImgPath = "foo/";
t.eq(OpenLayers.Util.getImagesLocation(), "foo/", "ImgPath works as expected.");
OpenLayers.ImgPath = null;
t.eq(OpenLayers.Util.getImagesLocation().substr(OpenLayers.Util.getImagesLocation().length-4,4), "img/", "ImgPath works as expected when not set.");
OpenLayers.ImgPath = '';
t.eq(OpenLayers.Util.getImagesLocation().substr(OpenLayers.Util.getImagesLocation().length-4,4), "img/", "ImgPath works as expected when set to ''.");
}
// -->
</script>
</head>