create project

This commit is contained in:
Chen Yi-Cyuan
2014-01-05 19:34:36 +08:00
commit 29f0933cb2
10 changed files with 297 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
(function(root) {
var assert = function (title, expect, actual) {
if(expect == actual)
console.log(title + ': true');
else
console.log(title + ': false', 'Except:' + expect, 'Actual: ' + actual);
};
if(typeof(module) != 'undefined')
global.assert = assert;
else if(root)
root.assert = assert;
})(this);
+12
View File
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MD2</title>
<script src="../src/md2.js"></script>
<script src="debug.js"></script>
<script src="test.js"></script>
</head>
<body>
</body>
</html>
+3
View File
@@ -0,0 +1,3 @@
md2 = require('../src/md2.js');
require('./debug.js');
require('./test.js');
+4
View File
@@ -0,0 +1,4 @@
assert('md2 1', '8350e5a3e24c153df2275c9f80692773', md2(''));
assert('md2 2', '03d85a0d629d2c442e987525319fc471', md2('The quick brown fox jumps over the lazy dog'));
assert('md2 3', '71eaa7e440b611e41a6f0d97384b342a', md2('The quick brown fox jumps over the lazy dog.'));
assert('md2 4', '7af93c270b0ec392ca2f0d90a927cf8a', md2('中文'));