40
tests/deprecated/BaseTypes.html
Normal file
40
tests/deprecated/BaseTypes.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../OLLoader.js"></script>
|
||||
<script src="../../../lib/deprecated.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_String_camelize(t) {
|
||||
t.plan(7);
|
||||
|
||||
var str = "chickenhead";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenhead", "string with no hyphens is left alone");
|
||||
|
||||
str = "chicken-head";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenHead", "string with one middle hyphen is camelized correctly");
|
||||
|
||||
str = "chicken-head-man";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenHeadMan", "string with multiple middle hyphens is camelized correctly");
|
||||
|
||||
str = "-chickenhead";
|
||||
t.eq(OpenLayers.String.camelize(str), "Chickenhead", "string with starting hyphen is camelized correctly (capitalized)");
|
||||
|
||||
str = "-chicken-head-man";
|
||||
t.eq(OpenLayers.String.camelize(str), "ChickenHeadMan", "string with starting hypen and multiple middle hyphens is camelized correctly");
|
||||
|
||||
str = "chicken-";
|
||||
t.eq(OpenLayers.String.camelize(str), "chicken", "string ending in hyphen is camelized correctly (hyphen dropped)");
|
||||
|
||||
str = "chicken-head-man-";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenHeadMan", "string with multiple middle hyphens and end hyphen is camelized correctly (end hyphen dropped)");
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
40
tests/deprecated/BaseTypes/String.html
Normal file
40
tests/deprecated/BaseTypes/String.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../OLLoader.js"></script>
|
||||
<script src="../../../lib/deprecated.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_String_camelize(t) {
|
||||
t.plan(7);
|
||||
|
||||
var str = "chickenhead";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenhead", "string with no hyphens is left alone");
|
||||
|
||||
str = "chicken-head";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenHead", "string with one middle hyphen is camelized correctly");
|
||||
|
||||
str = "chicken-head-man";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenHeadMan", "string with multiple middle hyphens is camelized correctly");
|
||||
|
||||
str = "-chickenhead";
|
||||
t.eq(OpenLayers.String.camelize(str), "Chickenhead", "string with starting hyphen is camelized correctly (capitalized)");
|
||||
|
||||
str = "-chicken-head-man";
|
||||
t.eq(OpenLayers.String.camelize(str), "ChickenHeadMan", "string with starting hypen and multiple middle hyphens is camelized correctly");
|
||||
|
||||
str = "chicken-";
|
||||
t.eq(OpenLayers.String.camelize(str), "chicken", "string ending in hyphen is camelized correctly (hyphen dropped)");
|
||||
|
||||
str = "chicken-head-man-";
|
||||
t.eq(OpenLayers.String.camelize(str), "chickenHeadMan", "string with multiple middle hyphens and end hyphen is camelized correctly (end hyphen dropped)");
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user