-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
32 lines (29 loc) · 1.27 KB
/
Copy pathtest.html
File metadata and controls
32 lines (29 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Refactored date examples</title>
<link rel="stylesheet" href="qunit.css" />
<!--<script src="script.js"></script>-->
</head>
<body>
<h1 id="qunit-header">QUnit test env</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests">
</ol>
<script src="qunit.js"></script>
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript">
test('convect_txt_to_number()', function () {
equal(convect_txt_to_number('ahsd'), NaN, 'буквы');
/*ok(convect_txt_to_number(' ') === '', 'Строка из пробельных символов'); */
equal(convect_txt_to_number('111,11'), '111.11', 'Правильная работа(одна запятая на точку)');
equal(convect_txt_to_number('111,11,11'), '111.11', 'Правильная работа (две запятые на точку)');
equal(convect_txt_to_number('11111'), '11111', 'без запятых');
/* equal(convect_txt_to_number(' x '), 'x', 'Табы');
equal(convect_txt_to_number(' x y '), 'x y', 'Табы и пробелы внутри строки не трогаем');*/
});
</script>
</body>
</html>