Git Repository Public Repository

namibia

URLs

Copy to Clipboard
 
df0489e1eeeeab5a9bd44e1d84fce49924fe1bac
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
52
/**
 * This is a CommonJS compatibility test. You can run this file with node.
 */
require.paths.unshift(__dirname + '/../scripts');

var sys = require('sys'),
	shSyntaxHighlighter = require('shCore').SyntaxHighlighter,
	code = 'test',
	brushes = [
		'AS3',
		'AppleScript',
		'Bash',
		'CSharp',
		'ColdFusion',
		'Cpp',
		'Css',
		'Delphi',
		'Diff',
		'Erlang',
		'Groovy',
		'JScript',
		'Java',
		'JavaFX',
		'Perl',
		'Php',
		'Plain',
		'PowerShell',
		'Python',
		'Ruby',
		'Sass',
		'Scala',
		'Sql',
		'Vb',
		'Xml'
	]
	;

brushes.sort();

for (var i = 0; i < brushes.length; i++)
{
	var name = brushes[i],
		brush = require('shBrush' + name).Brush
		;
		
	brush = new brush();
	brush.init({ toolbar: false });
	
	var result = brush.getHtml(code);
	
	sys.puts(name + (result != null ? ': ok' : ': NOT OK'));
}

Commits for namibiapublic/js/lib/syntaxhighlighter/tests/commonjs_tests.js

Diff revisions: vs.
Revision Author Commited Message
df0489 ... Mark Fri 14 Oct, 2016 10:01:00 +0000

initial commit