summaryrefslogtreecommitdiffstats
path: root/tests/assets.rs
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-05-27 08:47:07 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2020-05-27 09:50:22 +0200
commit2ab647476132c10419bc0ff79e0aeaf0c7be0c79 (patch)
treea7873c803ec2ae88d4d837b35a34efa880ca49b7 /tests/assets.rs
parentfe20328ab762e74080c7aa6cf1c522d2f6e8aad2 (diff)
Add unit test to make sure we are not missing any themes
Diffstat (limited to 'tests/assets.rs')
-rw-r--r--tests/assets.rs35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/assets.rs b/tests/assets.rs
new file mode 100644
index 00000000..ab0f7686
--- /dev/null
+++ b/tests/assets.rs
@@ -0,0 +1,35 @@
+use bat::assets::HighlightingAssets;
+
+/// This test ensures that we are not accidentally removing themes due to submodule updates.
+#[test]
+fn all_themes_are_present() {
+ let assets = HighlightingAssets::from_binary();
+
+ let mut themes: Vec<_> = assets.themes().collect();
+ themes.sort();
+
+ assert_eq!(
+ themes,
+ vec![
+ "1337",
+ "DarkNeon",
+ "Dracula",
+ "GitHub",
+ "Monokai Extended",
+ "Monokai Extended Bright",
+ "Monokai Extended Light",
+ "Monokai Extended Origin",
+ "Nord",
+ "OneHalfDark",
+ "OneHalfLight",
+ "Solarized (dark)",
+ "Solarized (light)",
+ "Sublime Snazzy",
+ "TwoDark",
+ "ansi-dark",
+ "ansi-light",
+ "base16",
+ "zenburn"
+ ]
+ );
+}