summaryrefslogtreecommitdiffstats
path: root/src/tests
AgeCommit message (Collapse)Author
2020-06-03Pass clap ArgMatches to cli::process_command_line_argumentsDan Davison
2020-06-02Implement compositional decoration attributesDan Davison
Ref #205
2020-06-02Add failing tests of compositional options: --element-style='box ul'Dan Davison
2020-06-01Add tests of deprecated --element-style={box,underline} optionsDan Davison
2020-05-31Make decorations honor --width variableDan Davison
2020-05-31Allow --ELEMENT-style=none meaning no styleDan Davison
2020-05-31Allow --ELEMENT-decoration-style=noneDan Davison
2020-05-31Fix testDan Davison
2020-05-31In tests, handle 4-bit colors in the context of arbitrary stylesDan Davison
2020-05-31Add failing tests of handling input with colorDan Davison
2020-05-31Add support for 4-bit foreground colors in test utilitiesDan Davison
4-bit color ANSI escape sequences look like: ^[1;31m For foreground, they are the 8 color codes 30-37 and the 8 bright color codes 90-97 Delta does not actually emit them (they are converted to ansi_term::Color::Fixed(n) by to_ansi_color), but git does by default, so they are needed for testing delta's handling of colors received from git.
2020-05-31In tests, interpret color string as style stringDan Davison
2020-05-31Add failing test: assert file is styled under decoration-style=omitDan Davison
2020-05-30Add test of --hunk-header-style=''Dan Davison
2020-05-30Strengthen tests slightlyDan Davison
2020-05-30Add tests of `--ELEMENT-decoration-style omit`Dan Davison
2020-05-30Add failing tests of `--thing-style omit`Dan Davison
2020-05-30Fix test namesDan Davison
2020-05-30Add failing test of --commit-style rawDan Davison
2020-05-30Add failing test of --file-style rawDan Davison
2020-05-30Add failing test of --hunk-header-style rawDan Davison
2020-05-30Update --*-style testsDan Davison
2020-05-29Paint box-drawing characters with bold attribute when bold requestedDan Davison
Reverts functionality change in ad9c0899c32217f42ce0b68e5191e16c69355c77
2020-05-28Add a blank line before each hunkDan Davison
2020-05-28Bug fix: honor bold by using "heavy" box drawing charactersDan Davison
This commit honors the bold style attribute by selecting characters from the "heavy" set and then painting those without the bold attribute set. Painting with the bold style attribute set seems to result in incorrect rendering of the box-drawing characters: e.g. the vertical line sections don't "meet up" (at least, in iTerm2 and Terminal on MacOS).
2020-05-28Bug fix: hunk header background color was not reaching box lineDan Davison
2020-05-27Refactor: Create color and theme modules, consolidate style codeDan Davison
2020-05-26Update tests after implementing decoration stylesDan Davison
2020-05-26Implement --{commit,file,hunk-header}-{style,decoration-style}Dan Davison
2020-05-25Add tests of --file-style, --commit-style, --hunk-styleDan Davison
2020-05-23Clean up testsDan Davison
2020-05-23Use CLI defaults when constructing command line options for testsDan Davison
2020-05-23Implement --*-non-emph stylesDan Davison
Fixes #169
2020-05-22Use new Style struct, wrapping ansi_term::StyleDan Davison
2020-05-22Implement hunk styles using style string argumentsDan Davison
- Do not apply foreground syntax style if it is "null syntect style" This isn't really correct. We should find either a valid sentinel value, or a way to only do the superimposing when we're doing syntax-highlighting. - Add --zero-style option (style for unchanged hunk lines) - Implement --color-only using an option rewrite rule
2020-05-22Use ansi_term style data structures instead of syntectDan Davison
2020-05-22Introduce style strings to replace color optionsDan Davison
https://git-scm.com/docs/git-config#Documentation/git-config.txt-color - Support "syntax" pseudo foreground color - Delete the --syntax-highlight CLI option This was never released.
2020-05-20Refactor: consume options when creating configDan Davison
2020-05-17Add new command-line options controlling foreground colorsDan Davison
- Revert "Do not expose new foreground color options yet" This reverts commit 253bc3ac0fe34a8f08c2bf625fcc8bb78de01a4c. - Make test assertions for minus_foreground_color - Fix test: fix detection of foreground color - Add diagnostic output to hunk highlighting test - Disable syntax-highlighting if the user has set foreground colors - Eliminate redundant style modifiers in config - Revert fixed_foreground_style implementation The syntax_style_sections will just contain syntect styles, or else a dummy no-op style. All delta styles will be done in diff_style_sections. - Add more dimensions to grid in hunk highlighting test - Support "none" as a value for background colors - Set foreground colors in a way that's consistent with background colors - Bug fix: don't highlight when there is no theme
2020-05-16Do not expose new foreground color options yetDan Davison
2020-05-16Hunk highlighting test and refactoringDan Davison
- New command-line option --syntax highlight to select which category of hunk lines to be syntax highlighted. --highlight-removed is now deprecated. - New hunk highlighting test tests syntax highlighting and background colors - Refactor: construction of style modifiers for config struct - Refactor: compute minus and plus foreground style sections separately - Refactor: foreground style logic - Refactor: rearrange style modifier construction for config - Refactor: change variable name: => highlight_minus_lines - Refactor: clean up --color-only config implementation