Add unit test to make sure we are not missing any themes
commit2ab647476132c10419bc0ff79e0aeaf0c7be0c79
authorsharkdp <davidpeter@web.de>
dateWed 27 May 2020, 08:47 (6 years ago)
parentfe20328
assets/themes.bin
Binary file not shown.
tests/assets.rsnew file+35
@@ -0,0 +1,35 @@
1+use bat::assets::HighlightingAssets;
2+
3+/// This test ensures that we are not accidentally removing themes due to submodule updates.
4+#[test]
5+fn all_themes_are_present() {
6+ let assets = HighlightingAssets::from_binary();
7+
8+ let mut themes: Vec<_> = assets.themes().collect();
9+ themes.sort();
10+
11+ assert_eq!(
12+ themes,
13+ vec![
14+ "1337",
15+ "DarkNeon",
16+ "Dracula",
17+ "GitHub",
18+ "Monokai Extended",
19+ "Monokai Extended Bright",
20+ "Monokai Extended Light",
21+ "Monokai Extended Origin",
22+ "Nord",
23+ "OneHalfDark",
24+ "OneHalfLight",
25+ "Solarized (dark)",
26+ "Solarized (light)",
27+ "Sublime Snazzy",
28+ "TwoDark",
29+ "ansi-dark",
30+ "ansi-light",
31+ "base16",
32+ "zenburn"
33+ ]
34+ );
35+}