1+ " Test file for Oscura Dusk colorscheme
2+ " Install Vader: https://github.com/junegunn/vader.vim
3+
4+ Before (Setup):
5+ colorscheme oscura-dusk
6+ syntax enable
7+
8+ Execute (Basic Color Definitions):
9+ let colors = {
10+ \ 'bg': '#131419',
11+ \ 'fg': '#E6E6E6',
12+ \ 'comment': '#46474F',
13+ \ 'keyword': '#9099A1',
14+ \ 'function': '#E6E7A3',
15+ \ 'string': '#F9B98C'
16+ \ }
17+
18+ " Test background color
19+ let bg_color = synIDattr(hlID('Normal'), 'bg#')
20+ Assert bg_color ==# colors.bg, 'Background color should be '.colors.bg.' but got '.bg_color
21+
22+ " Test foreground color
23+ let fg_color = synIDattr(hlID('Normal'), 'fg#')
24+ Assert fg_color ==# colors.fg, 'Foreground color should be '.colors.fg.' but got '.fg_color
25+
26+ Execute (Syntax Highlighting):
27+ " Test comment highlighting
28+ let comment_color = synIDattr(hlID('Comment'), 'fg#')
29+ Assert comment_color ==# colors.comment, 'Comment color should be '.colors.comment
30+
31+ " Test function highlighting
32+ let func_color = synIDattr(hlID('Function'), 'fg#')
33+ Assert func_color ==# colors.function, 'Function color should be '.colors.function
34+
35+ Execute (TypeScript Support):
36+ " Test TypeScript specific highlights
37+ let ts_keyword = synIDattr(hlID('typescriptKeyword'), 'fg#')
38+ Assert ts_keyword ==# colors.keyword, 'TypeScript keyword color should be '.colors.keyword
39+
40+ let ts_func = synIDattr(hlID('typescriptFuncName'), 'fg#')
41+ Assert ts_func ==# colors.function, 'TypeScript function name color should be '.colors.function
42+
43+ Execute (UI Elements):
44+ " Test UI elements like status line, line numbers, etc.
45+ let line_nr = synIDattr(hlID('LineNr'), 'fg#')
46+ Assert line_nr ==# '#32333B', 'Line number color should be #32333B'
47+
48+ let cursor_line_bg = synIDattr(hlID('CursorLine'), 'bg#')
49+ Assert cursor_line_bg ==# '#232323', 'Cursor line background should be #232323'
50+
51+ Execute (Special Highlights):
52+ " Test special syntax elements
53+ let string_color = synIDattr(hlID('String'), 'fg#')
54+ Assert string_color ==# colors.string, 'String color should be '.colors.string
55+
56+ " Test if italic style is applied to comments
57+ let comment_style = synIDattr(hlID('Comment'), 'italic')
58+ Assert comment_style == 1, 'Comments should be italic'
59+
60+ Execute (Terminal Colors):
61+ if has('nvim')
62+ " Test terminal colors in Neovim
63+ Assert g:terminal_color_0 ==# colors.bg, 'Terminal color 0 should match background'
64+ Assert g:terminal_color_7 ==# colors.fg, 'Terminal color 7 should match foreground'
65+ endif
0 commit comments