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