mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
Common (strutil): fixes unit tests
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
|
||||
#include "common/wcwidth.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
// #include <shlwapi.h>
|
||||
__stdcall char* StrStrIA(const char* lpFirst, const char* lpSrch);
|
||||
#define strcasestr StrStrIA
|
||||
#endif
|
||||
|
||||
static inline bool ffStrSet(const char* str) {
|
||||
if (str == NULL) {
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ int main(void) {
|
||||
uint8_t width = 0;
|
||||
uint8_t bytes = ffUtf8CharLenWidth(emoji, 4, &width);
|
||||
VERIFY(bytes == 4);
|
||||
VERIFY(width == 2); // Most emoji are double-width
|
||||
VERIFY(width == mk_wcwidth(0x1F600));
|
||||
}
|
||||
|
||||
puts("\033[32mAll tests passed!" FASTFETCH_TEXT_MODIFIER_RESET);
|
||||
|
||||
Reference in New Issue
Block a user