File: doc/syntax_highlighter/tests/commonjs_tests.js

Recommend this page to a friend!
  Classes of Everton da Rosa  >  PHP4Console  >  doc/syntax_highlighter/tests/commonjs_tests.js  >  Download  
File: doc/syntax_highlighter/tests/commonjs_tests.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP4Console
Render text and shapes in a terminal console
Author: By
Last change:
Date: 5 years ago
Size: 820 bytes


Class file image Download
 * 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 = [


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'));

For more information send a message to info at phpclasses dot org.