Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
1684f33b
Commit
1684f33b
authored
Nov 24, 2016
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for focus and marked background colors
parent
162cc776
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
test/data/ConfigTest4.conf
test/data/ConfigTest4.conf
+2
-0
test/test_colors.py
test/test_colors.py
+8
-0
test/test_config.py
test/test_config.py
+12
-0
No files found.
test/data/ConfigTest4.conf
View file @
1684f33b
...
...
@@ -24,3 +24,5 @@ project_color = junk
context_color
=
junk
metadata_color
=
junk
link_color
=
junk
focus_background_color
=
junk
marked_background_color
=
junk
test/test_colors.py
View file @
1684f33b
...
...
@@ -154,6 +154,14 @@ class ColorsTest(TopydoTest):
self
.
assertEqual
(
color_b
,
''
)
self
.
assertEqual
(
color_c
,
''
)
def
test_focus_color
(
self
):
config
(
p_overrides
=
{(
'colorscheme'
,
'focus_background_color'
):
'gray'
})
self
.
assertEqual
(
config
().
focus_background_color
().
as_ansi
(),
'
\
033
[0;37m'
)
def
test_mark_color
(
self
):
config
(
p_overrides
=
{(
'colorscheme'
,
'marked_background_color'
):
'blue'
})
self
.
assertEqual
(
config
().
marked_background_color
().
as_ansi
(),
'
\
033
[0;34m'
)
def
test_empty_color_values
(
self
):
config
(
"test/data/ColorsTest5.conf"
)
project_color
=
config
().
project_color
().
as_ansi
(
p_decoration
=
'bold'
)
...
...
test/test_config.py
View file @
1684f33b
...
...
@@ -128,6 +128,18 @@ class ConfigTest(TopydoTest):
self
.
assertEqual
(
config
(
"test/data/ConfigTest5.conf"
).
link_color
().
color
,
6
)
def
test_config24
(
self
):
""" No focus background color value. """
self
.
assertEqual
(
config
(
"test/data/ConfigTest5.conf"
).
focus_background_color
().
color
,
7
)
def
test_config25
(
self
):
""" No mark background color value. """
self
.
assertEqual
(
config
(
"test/data/ConfigTest5.conf"
).
marked_background_color
().
color
,
4
)
def
test_config26
(
self
):
self
.
assertTrue
(
config
(
"test/data/ConfigTest4.conf"
).
focus_background_color
().
is_neutral
())
self
.
assertTrue
(
config
(
"test/data/ConfigTest4.conf"
).
marked_background_color
().
is_neutral
())
def
test_config27
(
self
):
""" column_keymap test. """
keymap
,
keystates
=
config
(
"test/data/ConfigTest6.conf"
).
column_keymap
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment