mirror of
https://github.com/noib3/nvim-oxi.git
synced 2025-08-04 19:08:31 +00:00
api: test that foreground highlights are set correctly
This commit is contained in:
parent
96d95c1641
commit
a614fa52fe
1 changed files with 13 additions and 0 deletions
|
@ -109,6 +109,19 @@ fn get_runtime_file() {
|
|||
assert!(api::get_runtime_file("*", true).unwrap().next().is_some());
|
||||
}
|
||||
|
||||
#[oxi::test]
|
||||
fn hl_foreground() {
|
||||
let opts = SetHighlightOpts::builder()
|
||||
.foreground("#FF0000")
|
||||
.strikethrough(true)
|
||||
.bold(true)
|
||||
.build();
|
||||
api::set_hl(0, "Header", &opts).unwrap();
|
||||
|
||||
let infos = api::get_hl_by_name("Header", true).unwrap();
|
||||
assert_eq!(infos.foreground, Some(16711680));
|
||||
}
|
||||
|
||||
#[oxi::test]
|
||||
fn hl_underline() {
|
||||
let opts = SetHighlightOpts::builder().underline(true).build();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue