2015-07-13 12:46:06 +08:00
|
|
|
/*
|
2015-07-13 12:39:05 +08:00
|
|
|
var semver = require('semver'),
|
|
|
|
cmd = 'node bin/showdown.js';
|
2015-07-13 12:09:03 +08:00
|
|
|
|
|
|
|
describe('showdown cli', function () {
|
|
|
|
'use strict';
|
2015-07-13 12:39:05 +08:00
|
|
|
if (semver.gt(process.versions.node, '0.12.0')) {
|
|
|
|
var execSync = require('child_process').execSync;
|
|
|
|
it('basic stdin stdout', function () {
|
|
|
|
var otp = execSync(cmd + ' makehtml', {
|
|
|
|
encoding: 'utf8',
|
|
|
|
input: '**foo**'
|
|
|
|
});
|
|
|
|
otp.trim().should.equal('<p><strong>foo</strong></p>');
|
2015-07-13 12:09:03 +08:00
|
|
|
});
|
2015-07-13 12:39:05 +08:00
|
|
|
}
|
2015-07-13 12:09:03 +08:00
|
|
|
});
|
2015-07-13 12:46:06 +08:00
|
|
|
*/
|