-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ss
51 lines (44 loc) · 1.45 KB
/
test.ss
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#{template test(asserts)}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Snakeskin.compile</title>
<link type="text/css" rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.13.0.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-1.11.0.js"></script>
<script type="text/javascript" src="../build/snakeskin.min.js"></script>
<script type="text/javascript">
Object.create = Object.create || function (obj) {
function F() {
};
F.prototype = obj;
return new F();
};
function i18n(str) {
return str;
}
</script>
</head>
<body>
<h1 id="qunit-header">Test: Snakeskin.compile</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
#{forEach asserts => el}
<script type="text/x-snakeskin-template" id="#{el.id}">
#{'\n' + el.tpl|!html}
</script>
<script type="text/javascript">
Snakeskin.compile(document.getElementById('#{el.id}'), {prettyPrint: true});
test('#{el.id}', function () {
#{forEach el.js => el}
#{el|!html}
#{/}
});
</script>
#{/}
</body>
</html>
#{/}