diff --git a/src/autotests/CMakeLists.txt b/src/autotests/CMakeLists.txt index 7cca0339..a04029ce 100644 --- a/src/autotests/CMakeLists.txt +++ b/src/autotests/CMakeLists.txt @@ -9,6 +9,12 @@ ecm_mark_as_test(CharacterColorTest) add_test(CharacterColorTest CharacterColorTest) target_link_libraries(CharacterColorTest ${KONSOLE_TEST_LIBS}) +add_executable(CharacterWidthTest CharacterWidthTest.cpp) +ecm_mark_as_test(CharacterWidthTest) +add_test(CharacterWidthTest CharacterWidthTest) +target_link_libraries(CharacterWidthTest ${KONSOLE_TEST_LIBS}) + + if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") add_executable(DBusTest DBusTest.cpp) ecm_mark_as_test(DBusTest) diff --git a/src/konsole_wcwidth.cpp b/src/konsole_wcwidth.cpp index ba5e06a8..356a3504 100644 --- a/src/konsole_wcwidth.cpp +++ b/src/konsole_wcwidth.cpp @@ -68,6 +68,7 @@ // Own #include "konsole_wcwidth.h" +#include "konsole_export.h" struct interval { unsigned long first; @@ -125,7 +126,7 @@ static int bisearch(unsigned long ucs, const struct interval* table, int max) * in ISO 10646. */ -int konsole_wcwidth(quint16 oucs) +int KONSOLEPRIVATE_EXPORT konsole_wcwidth(quint16 oucs) { /* NOTE: It is not possible to compare quint16 with the new last four lines of characters, * therefore this cast is now necessary.