46 lines
1.6 KiB
HTML
Executable File
46 lines
1.6 KiB
HTML
Executable File
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>Calendar Date Select Test Cases</title>
|
|
<script src="../prototype.js" type="text/javascript"></script>
|
|
<script src="../unittest.js" type="text/javascript"></script>
|
|
<!-- other JavaScript includes -->
|
|
<script src="../../public/javascripts/calendar_date_select/calendar_date_select.js" type="text/javascript"></script>
|
|
|
|
<link rel="stylesheet" href="../../public/stylesheets/calendar_date_select/red.css" type="text/css" />
|
|
<link rel="stylesheet" href="../test.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Log output -->
|
|
<div id="testlog"> </div>
|
|
|
|
<!-- here go any elements you do the testing on -->
|
|
<input type="text" id="cds_test" />
|
|
|
|
<!-- Tests -->
|
|
<script type="text/javascript" language="javascript">
|
|
// <![CDATA[
|
|
new Test.Unit.Runner({
|
|
setup: function() { with(this){
|
|
$("cds_test").value="";
|
|
$("cds_test").disabled = false;
|
|
$("cds_test").readOnly = false;
|
|
}},
|
|
test_math_floor_to_interval: function() { with(this) {
|
|
assertEqual(5, Math.floor_to_interval(9,5));
|
|
assertEqual(5, Math.floor_to_interval(5,5));
|
|
assertEqual(0, Math.floor_to_interval(1,5));
|
|
}},
|
|
test_padded2__should_pad_properly_and_interpret_base_10: function() {with(this) {
|
|
assertEqual("11", Date.padded2("011"));
|
|
assertEqual("09", Date.padded2("09"));
|
|
assertEqual("09", Date.padded2("9"));
|
|
}}
|
|
});
|
|
// ]]>
|
|
</script>
|
|
</body>
|
|
</html> |