mirror of
https://github.com/emn178/js-md2.git
synced 2026-08-12 20:27:33 +08:00
create project
This commit is contained in:
@@ -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);
|
||||
@@ -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>
|
||||
@@ -0,0 +1,3 @@
|
||||
md2 = require('../src/md2.js');
|
||||
require('./debug.js');
|
||||
require('./test.js');
|
||||
@@ -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('中文'));
|
||||
Reference in New Issue
Block a user