Add test_KML stub (does nothing useful.)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4188 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-09-04 15:28:14 +00:00
parent a113ac58b3
commit a339074539
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<html>
<head>
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_Format_KML_constructor(t) {
t.plan(4);
var options = {'foo': 'bar'};
var format = new OpenLayers.Format.KML(options);
t.ok(format instanceof OpenLayers.Format.KML,
"new OpenLayers.Format.KML returns object" );
t.eq(format.foo, "bar", "constructor sets options correctly");
t.eq(typeof format.read, "function", "format has a read function");
t.eq(typeof format.write, "function", "format has a write function");
}
function test_Format_KML_read(t) {
t.plan(1);
t.ok(true, "Read tests not done yet.");
}
function test_Format_KML_write(t) {
t.plan(1);
t.ok(true, "Write tests not done yet.");
var format = new OpenLayers.Format.KML();
//var doc = format.read(text);
//var out = format.write(doc);
//out = out.replace(/[\r\n]/g, '');
//t.eq(text, out,
// "correctly writes an KML DOM doc");
}
</script>
</head>
<body>
</body>
</html>

View File

@@ -21,6 +21,7 @@
<li>Geometry/test_Surface.html</li>
<li>test_Format.html</li>
<li>Format/test_XML.html</li>
<li>Format/test_KML.html</li>
<li>Format/test_GeoRSS.html</li>
<li>Format/test_JSON.html</li>
<li>Format/test_GeoJSON.html</li>