]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/ansicolors/test/ansicolors.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / ansicolors / test / ansicolors.js
1 'use strict';
2
3 var assert = require('assert')
4   , colors = require('..')
5   , open = colors.open
6   , close = colors.close
7
8 console.log('Foreground colors ..');
9
10 assert.equal(colors.white('printed in white'), '\u001b[37mprinted in white\u001b[39m');
11
12 assert.equal(colors.black('printed in black'), '\u001b[30mprinted in black\u001b[39m');
13 assert.equal(colors.brightBlack('printed in bright black'), '\u001b[90mprinted in bright black\u001b[39m');
14
15 assert.equal(colors.green('printed in green'), '\u001b[32mprinted in green\u001b[39m');
16 assert.equal(colors.brightGreen('printed in bright green'), '\u001b[92mprinted in bright green\u001b[39m');
17
18 assert.equal(colors.red('printed in red'), '\u001b[31mprinted in red\u001b[39m');
19 assert.equal(colors.brightRed('printed in bright red'), '\u001b[91mprinted in bright red\u001b[39m');
20
21 console.log('OK');
22
23 console.log('Background colors ..');
24
25 assert.equal(
26     colors.bgBlack('printed with black background')
27   , '\u001b[40mprinted with black background\u001b[49m'
28 );
29
30 assert.equal(
31     colors.bgYellow('printed with yellow background')
32   , '\u001b[43mprinted with yellow background\u001b[49m'
33 );
34 assert.equal(
35     colors.bgBrightYellow('printed with bright yellow background')
36   , '\u001b[103mprinted with bright yellow background\u001b[49m'
37 );
38
39 assert.equal(
40     colors.bgWhite('printed with white background')
41   , '\u001b[47mprinted with white background\u001b[49m'
42 );
43
44 console.log('OK');
45
46 console.log('Mixing background and foreground colors ..');
47
48 assert.equal(
49     colors.blue(colors.bgYellow('printed in blue with yellow background'))
50   , '\u001b[34m\u001b[43mprinted in blue with yellow background\u001b[49m\u001b[39m'
51 );
52 assert.equal(
53     colors.bgYellow(colors.blue('printed in blue with yellow background again'))
54   , '\u001b[43m\u001b[34mprinted in blue with yellow background again\u001b[39m\u001b[49m'
55 );
56
57 console.log('OK');
58
59 console.log('Open ...');
60
61 assert.equal(open.black, '\u001b[30m');
62 assert.equal(open.bgYellow, '\u001b[43m');
63
64 console.log('OK');
65
66 console.log('Close ...');
67
68 assert.equal(close.black, '\u001b[39m');
69 assert.equal(close.bgYellow, '\u001b[49m');
70
71 console.log('OK');