From 3f7eb1b2aa196c66fdc9f8851cacd1915a29c61b Mon Sep 17 00:00:00 2001
From: patrick96
Date: Thu, 19 Mar 2020 15:01:56 +0100
Subject: [PATCH] test(iconset): Add failing fuzzy match test
Ref: #2041
---
tests/CMakeLists.txt | 1 +
tests/unit_tests/drawtypes/iconset.cpp | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 tests/unit_tests/drawtypes/iconset.cpp
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 33c9c26b..6dffb6e8 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -58,6 +58,7 @@ add_unit_test(components/bar)
add_unit_test(components/parser)
add_unit_test(components/config_parser)
add_unit_test(drawtypes/label)
+add_unit_test(drawtypes/iconset)
# Run make check to build and run all unit tests
add_custom_target(check
diff --git a/tests/unit_tests/drawtypes/iconset.cpp b/tests/unit_tests/drawtypes/iconset.cpp
new file mode 100644
index 00000000..8cc53d24
--- /dev/null
+++ b/tests/unit_tests/drawtypes/iconset.cpp
@@ -0,0 +1,18 @@
+#include "drawtypes/iconset.hpp"
+
+#include "common/test.hpp"
+
+using namespace std;
+using namespace polybar;
+using namespace polybar::drawtypes;
+
+TEST(IconSet, fuzzyMatchExactMatchFirst) {
+ iconset_t icons = make_shared();
+
+ icons->add("1", make_shared