This commit is contained in:
2025-11-23 00:17:01 +01:00
parent f315874236
commit 5e1901105a
12 changed files with 69 additions and 4 deletions
+10 -3
View File
@@ -24,13 +24,14 @@ TESTS = $(TEST_DIR)/feature_test.rc \
$(TEST_DIR)/endless_loop_test.rc \
$(TEST_DIR)/math_test.rc \
$(TEST_DIR)/string_test.rc \
$(TEST_DIR)/string_manip_test.rc
$(TEST_DIR)/string_manip_test.rc \
$(TEST_DIR)/increment_decrement_test.rc
EXAMPLES = $(EXAMPLE_DIR)/http_simple.rc \
$(EXAMPLE_DIR)/http_persistent.rc \
$(EXAMPLE_DIR)/http_multi.rc
.PHONY: all clean test run-tests run-examples help dirs
.PHONY: all clean test run-tests run-examples help
all: dirs $(TARGET)
@@ -40,7 +41,7 @@ dirs:
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJECTS)
$(TARGET): dirs $(OBJECTS)
$(CC) $(OBJECTS) -o $(TARGET) $(LDFLAGS)
clean:
@@ -64,6 +65,9 @@ test: $(TARGET)
@echo "Running string manipulation tests..."
@$(TARGET) $(TEST_DIR)/string_manip_test.rc 2>&1 | grep -v "Error at token" || true
@echo ""
@echo "Running increment decrement tests..."
@$(TARGET) $(TEST_DIR)/increment_decrement_test.rc 2>&1 | grep -v "Error at token" || true
@echo ""
@echo "=== All Tests Completed ==="
run-feature-test: $(TARGET)
@@ -81,6 +85,9 @@ run-string-test: $(TARGET)
run-string-manip: $(TARGET)
$(TARGET) $(TEST_DIR)/string_manip_test.rc
run-increment-decrement-test: $(TARGET)
$(TARGET) $(TEST_DIR)/increment_decrement_test.rc
run-http-simple: $(TARGET)
$(TARGET) $(EXAMPLE_DIR)/http_simple.rc