ColorSchemeUnit
Color scheme Sublime Text Unit Testing.
Details
Installs
- Total 5K
- Win 4K
- Mac 525
- Linux 649
Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
ColorSchemeUnit
A testing framework for Sublime Text color schemes.
Setup
Install ColorSchemeUnit via Package Control.
Commands
Command | Description |
---|---|
ColorSchemeUnit: Test Suite | Run test suite of the current file. |
ColorSchemeUnit: Test File | Run tests for the current file. |
ColorSchemeUnit: Show Styles | Show styles at the current cursor position. |
ColorSchemeUnit: Generate Assertions | Generates assertions at the current cursor position. |
Key Bindings
Key | Description |
---|---|
f4 |
Jump to Next Failure |
shift+f4 |
Jump to Previous Failure |
Settings
Setting | Description | Type | Default |
---|---|---|---|
color_scheme_unit.coverage |
Enable coverage report. | boolean |
false |
color_scheme_unit.debug |
Enable debug messages. | boolean |
false |
Menu → Preferences → Settings
"color_scheme_unit.debug": true,
"color_scheme_unit.coverage": true,
Usage
Tests are similar to Sublime Text syntax tests. Here is an
// COLOR SCHEME TEST "MonokaiFree.sublime-color-scheme" "C"
#include <windows.h>
// ^^^^^ fg=#f92672 fs=
// ^^^^^^^^^^^ fg=#e6db74 fs=
typedef int myint;
// ^^^^ fg=#66d9ef fs=italic
// ^^^ fg=#66d9ef fs=italic
// ^^^^^ fg=#a6e22e fs=
// ^ fg=#f8f8f2 fs=
Tests
File names
Test must begin color_scheme_test
e.g. color_scheme_test.css
, color_scheme_test.php
, color_scheme_test.rb
.
The recommended package layout:
.
├── Monokai.sublime-color-scheme
└── tests/
├── color_scheme_test.css
├── color_scheme_test.php
├── color_scheme_test.rb
└── ...
Headers
The first line must start:
<begin-comment> COLOR SCHEME TEST "<color-scheme>" "<syntax>"
Parameter | Description |
---|---|
<begin-comment> |
Any syntax comment e.g. // , |
<!DOCTYPE html>
<meta charset="utf-8">
</head>
<body>
<p class="title" id='title'>Title</p>
</body>
#### PHP example
```php
<?php // COLOR SCHEME TEST "MonokaiFree.sublime-color-scheme" "PHP"
use \Psr\Http\Message\ServerRequestInterface as Request;
//^ fg=#f92672 fs=
// ^^^^^^^^^^^^^^^^^^ fg=#f8f8f2 fs=
// ^^^^^^^^^^^^^^^^^^^^^^ fg=#66d9ef fs=italic
// ^^ fg=#f92672 fs=
// ^^^^^^^ fg=#a6e22e fs=
// ^ fg=#f8f8f2 fs=
use \Psr\Http\Message\ResponseInterface as Response;
//^ fg=#f92672 fs=
// ^^^^^^^^^^^^^^^^^^ fg=#f8f8f2 fs=
// ^^^^^^^^^^^^^^^^^ fg=#66d9ef fs=italic
// ^^ fg=#f92672 fs=
// ^^^^^^^^ fg=#a6e22e fs=
// ^ fg=#f8f8f2 fs=
require 'vendor/autoload.php';
// ^^^^ fg=#f92672 fs=
// ^^^^^^^^^^^^^^^^^^^^^ fg=#e6db74 fs=
// ^ fg=#f8f8f2 fs=
CI
To run tests in CI see UnitTesting documentation.
Changelog
See CHANGELOG.md.
License
Released under the GPL-3.0-or-later License.