# ColorSchemeUnit A testing framework for Sublime Text color schemes. [![Continuous Integration](https://github.com/gerardroche/sublime-color-scheme-unit/actions/workflows/ci.yml/badge.svg)](https://github.com/gerardroche/sublime-color-scheme-unit/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/djk37txaryaxagr1?svg=true)](https://ci.appveyor.com/project/gerardroche/sublime-color-scheme-unit) [![codecov](https://codecov.io/gh/gerardroche/sublime-color-scheme-unit/branch/master/graph/badge.svg?token=Ln3mldFyPv)](https://codecov.io/gh/gerardroche/sublime-color-scheme-unit) ![Package Control](https://img.shields.io/packagecontrol/dt/ColorSchemeUnit) ![ColorSchemeUnit](screenshot.png) ## Setup Install [ColorSchemeUnit](https://packagecontrol.io/packages/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 ```js "color_scheme_unit.debug": true, "color_scheme_unit.coverage": true, ``` ## Usage Tests are similar to Sublime Text [syntax tests](https://www.sublimetext.com/docs/3/syntax.html). Here is an ```c // COLOR SCHEME TEST "MonokaiFree.sublime-color-scheme" "C" #include // ^^^^^ 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: ```sh . ├── Monokai.sublime-color-scheme └── tests/ ├── color_scheme_test.css ├── color_scheme_test.php ├── color_scheme_test.rb └── ... ``` #### Headers The first line must start: ``` COLOR SCHEME TEST "" "" ``` Parameter | Description :-------- | :---------- `` | Any syntax comment e.g. `//`, `

Title

``` #### PHP example ```php