Skip to content

Commit

Permalink
Add integration test, fix themes
Browse files Browse the repository at this point in the history
  • Loading branch information
David Peter committed Jun 22, 2024
1 parent 9b1c4bd commit 37cd78b
Show file tree
Hide file tree
Showing 12 changed files with 158 additions and 0 deletions.
113 changes: 113 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ features = ["suggestions", "color", "wrap_help", "cargo"]
lto = true
strip = true
codegen-units = 1

[dev-dependencies]
assert_cmd = "2.0.14"
15 changes: 15 additions & 0 deletions tests/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use assert_cmd::Command;

#[test]
fn can_call_vivid_generate_for_all_themes() {
let themes_dir = std::fs::read_dir("themes").unwrap();
for theme in themes_dir {
let theme = theme.unwrap();
let theme_path = theme.path();
let theme_name = theme_path.file_stem().unwrap().to_string_lossy().replace(".yml", "");

let mut cmd = Command::cargo_bin("vivid").unwrap();

cmd.arg("generate").arg(theme_name).assert().success();
}
}
3 changes: 3 additions & 0 deletions themes/dracula.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ media:
fonts:
foreground: orange

3d:
foreground: pink

office:
foreground: orange

Expand Down
3 changes: 3 additions & 0 deletions themes/lava.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ media:
fonts:
foreground: kourkinova

3d:
foreground: kourkinova

office:
foreground: christine
font-style: bold
Expand Down
3 changes: 3 additions & 0 deletions themes/modus-operandi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ media:
fonts:
foreground: magenta

3d:
foreground: magenta

office:
foreground: yellow

Expand Down
3 changes: 3 additions & 0 deletions themes/nord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ media:

fonts:
foreground: aurora-nord15

3d:
foreground: aurora-nord15

office:
foreground: aurora-nord15
Expand Down
3 changes: 3 additions & 0 deletions themes/solarized-dark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ media:
fonts:
foreground: violet

3d:
foreground: magenta

office:
foreground: orange

Expand Down
3 changes: 3 additions & 0 deletions themes/solarized-light.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ media:
fonts:
foreground: violet

3d:
foreground: magenta

office:
foreground: orange

Expand Down
3 changes: 3 additions & 0 deletions themes/tokyonight-moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ media:
fonts:
foreground: blue2
font-style: bold
3d:
foreground: magenta
font-style: bold

office:
foreground: pink
Expand Down
3 changes: 3 additions & 0 deletions themes/tokyonight-night.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ media:
fonts:
foreground: green2
font-style: bold
3d:
foreground: purple1
font-style: bold

office:
foreground: purple2
Expand Down
3 changes: 3 additions & 0 deletions themes/tokyonight-storm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ media:
fonts:
foreground: green2
font-style: bold
3d:
foreground: purple1
font-style: bold

office:
foreground: purple2
Expand Down

0 comments on commit 37cd78b

Please sign in to comment.