mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-05-10 19:00:57 +08:00
- Make client width/height _Atomic to fix data race between window-change callback thread and session thread - Persist join/leave system messages via message_save() - Fix ftell() error handling: check <= 0 instead of == 0 - Make room_add_message static to enforce lock-must-be-held contract - Use local copy in execute_command to avoid mutating command_input - Increase help_copy buffer from 4096 to 8192 for CJK text safety - Add :q/:quit/:exit command for Vim-style disconnect - Fix unit test Makefile to link common.c
31 lines
630 B
Makefile
31 lines
630 B
Makefile
# Unit Tests Makefile
|
|
CC = gcc
|
|
CFLAGS = -Wall -Wextra -std=c11 -I../../include
|
|
LDFLAGS = -pthread
|
|
|
|
# Source files
|
|
UTF8_SRC = ../../src/utf8.c
|
|
MESSAGE_SRC = ../../src/message.c
|
|
COMMON_SRC = ../../src/common.c
|
|
|
|
TESTS = test_utf8 test_message
|
|
|
|
.PHONY: all clean run
|
|
|
|
all: $(TESTS)
|
|
|
|
test_utf8: test_utf8.c $(UTF8_SRC)
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
|
|
|
test_message: test_message.c $(MESSAGE_SRC) $(UTF8_SRC) $(COMMON_SRC)
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
|
|
|
run: all
|
|
@echo "=== Running UTF-8 Tests ==="
|
|
./test_utf8
|
|
@echo ""
|
|
@echo "=== Running Message Tests ==="
|
|
./test_message
|
|
|
|
clean:
|
|
rm -f $(TESTS) *.o test_messages.log
|