Ajout d'un test d'un autre groupe

This commit is contained in:
Moncef STITI 2025-03-16 14:09:18 +01:00
parent 072e5205e7
commit 15a06d738f
8 changed files with 84 additions and 0 deletions
tests/tests-autres-groupes/lenny-khalid-thomas/test-10-NomDeFichier

@ -0,0 +1,23 @@
# Bakefile
# Define variables
SRC_DIR = .
BUILD_DIR = .
OUTPUT_DIR = .
# Target to create directories
setup:
mkdir -p "$(OUTPUT_DIR)"
# Target to compile the source files
compile: setup
gcc -c "$(SRC_DIR)/main program.c" -o "$(BUILD_DIR)/main program.o"
gcc -c "$(SRC_DIR)/utils!.c" -o "$(BUILD_DIR)/utils!.o"
# Target to link the object files into an executable
link: compile
gcc -o "$(OUTPUT_DIR)/test_program" "$(BUILD_DIR)/main program.o" "$(BUILD_DIR)/utils!.o"
# Clean target to remove created directories and files
clean:
rm -rf "$(BUILD_DIR)"

@ -0,0 +1,8 @@
#include <stdio.h>
#include "utils!.h"
int main() {
printf("Program with special characters started!\n");
print_hello();
return 0;
}

@ -0,0 +1,5 @@
#include <stdio.h>
void print_hello() {
printf("Hello from utils with special characters!\n");
}

@ -0,0 +1,6 @@
#ifndef UTILS_H
#define UTILS_H
void print_hello();
#endif

@ -0,0 +1,23 @@
# Bakefile
# Define variables
SRC_DIR = .
BUILD_DIR = .
OUTPUT_DIR = .
# Target to create directories
setup:
mkdir -p "$(OUTPUT_DIR)"
# Target to compile the source files
compile: setup
gcc -c "$(SRC_DIR)/main program.c" -o "$(BUILD_DIR)/main program.o"
gcc -c "$(SRC_DIR)/utils!.c" -o "$(BUILD_DIR)/utils!.o"
# Target to link the object files into an executable
link: compile
gcc -o "$(OUTPUT_DIR)/test_program" "$(BUILD_DIR)/main program.o" "$(BUILD_DIR)/utils!.o"
# Clean target to remove created directories and files
clean:
rm -rf "$(BUILD_DIR)"

@ -0,0 +1,8 @@
#include <stdio.h>
#include "utils!.h"
int main() {
printf("Program with special characters started!\n");
print_hello();
return 0;
}

@ -0,0 +1,5 @@
#include <stdio.h>
void print_hello() {
printf("Hello from utils with special characters!\n");
}

@ -0,0 +1,6 @@
#ifndef UTILS_H
#define UTILS_H
void print_hello();
#endif