Link Ziran's byte text module into text link tests
AppTextFromCString now reads the buffer in Ziran through byte_text_linux, so the text, list screen, and raylib text input link tests build that generated module instead of stubbing the old C host function.
This commit is contained in:
1 parent
3dd1755e90
commit
7ca7ea8a44
6 files changed
+3
-26
No files matched your search
@@ -7,14 +7,6 @@ static int save_succeeds = 1;
|
||||
static int sync_calls;
|
||||
static char saved_comment[ELIST_COMMENT_SIZE];
|
||||
|
||||
String
|
||||
app_text_from_cstring(uint8_t *data, int32_t capacity)
|
||||
{
|
||||
size_t length = 0;
|
||||
while(length < (size_t)capacity && data[length] != 0)
|
||||
length++;
|
||||
return StringView((const char *)data, length);
|
||||
}
|
||||
|
||||
int32_t
|
||||
AppScale(int32_t pixels)
|
||||
|
||||
@@ -28,6 +28,7 @@ mkdir -p "$work/c"
|
||||
-I"$work/c/daochi-client" \
|
||||
"$root/tests/elist_screen_link_test.c" \
|
||||
"$work/c/screens/elist_screen.c" "$work/c/text_buffers.c" \
|
||||
"$work/c/byte_text_linux.c" \
|
||||
-o "$work/test"
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
|
||||
echo "Inbe elist screen Ziran/native test passed"
|
||||
@@ -10,14 +10,6 @@ static bool control_down;
|
||||
static bool paste_pressed;
|
||||
static uint8_t clipboard[32] = "pasted";
|
||||
|
||||
String
|
||||
app_text_from_cstring(uint8_t *data, int32_t capacity)
|
||||
{
|
||||
size_t length = 0;
|
||||
while(length < (size_t)capacity && data[length] != 0)
|
||||
length++;
|
||||
return StringView((const char *)data, length);
|
||||
}
|
||||
|
||||
int32_t
|
||||
GetCharPressed(void)
|
||||
|
||||
@@ -22,6 +22,7 @@ mkdir -p "$work/c"
|
||||
-I"$work/c/ui" -I"$work/c/app" \
|
||||
"$root/tests/raylib_text_input_link_test.c" \
|
||||
"$work/c/platform/raylib_text_input.c" "$work/c/text_buffers.c" \
|
||||
"$work/c/byte_text_linux.c" \
|
||||
-o "$work/test"
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
|
||||
echo "Inbe raylib text input Ziran/native test passed"
|
||||
@@ -4,15 +4,6 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
String
|
||||
app_text_from_cstring(uint8_t *data, int32_t capacity)
|
||||
{
|
||||
size_t length = 0;
|
||||
while(length < (size_t)capacity && data[length] != 0)
|
||||
length++;
|
||||
return StringView((const char *)data, length);
|
||||
}
|
||||
|
||||
static void
|
||||
expect(const char *format, int32_t value, const char *wanted)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,6 @@ mkdir -p "$work/c"
|
||||
-ffunction-sections -fdata-sections -Wl,--gc-sections \
|
||||
-I"$root/build/packages/ziran/include" -I"$work/c" \
|
||||
"$root/tests/text_buffers_link_test.c" \
|
||||
"$work/c/app/text_buffers.c" -o "$work/test"
|
||||
"$work/c/app/text_buffers.c" "$work/c/byte_text_linux.c" -o "$work/test"
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
|
||||
echo "Inbe text buffer Ziran/native test passed"
|
||||
Reference in new issue
Block a user