mirror of
https://gitlab.com/klmp200/fish.git
synced 2025-07-11 04:09:22 +00:00
Tests complets de utils
This commit is contained in:
@ -4,5 +4,5 @@ project(fish_shell)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_FLAGS "-Wall -Werror -pedantic -fpic -Wextra -Wshadow")
|
||||
|
||||
file(GLOB SOURCE_FILES *)
|
||||
set(SOURCE_FILES main.c fish_types.h fish_core.h fish_core.c fish_commands.c fish_commands.h fish_globbing.c fish_globbing.h fish_utils.c fish_utils.h)
|
||||
add_executable(fish ${SOURCE_FILES})
|
@ -10,9 +10,6 @@
|
||||
#include "fish_core.h"
|
||||
#include "fish_globbing.h"
|
||||
|
||||
#define FISH_BUFFER_SIZE 1024
|
||||
#define FISH_TOKENS " \t\r\n\a"
|
||||
|
||||
void fishLoop(Settings * settings){
|
||||
char * line = NULL;
|
||||
WordList* splited = NULL;
|
||||
|
@ -5,6 +5,10 @@
|
||||
#ifndef FISH_FISH_CORE_H
|
||||
#define FISH_FISH_CORE_H
|
||||
|
||||
#define FISH_BUFFER_SIZE 1024
|
||||
#define FISH_TOKENS " \t\r\n\a"
|
||||
|
||||
|
||||
|
||||
#include "fish_types.h"
|
||||
#include "fish_commands.h"
|
||||
@ -12,7 +16,7 @@
|
||||
|
||||
/* WordArray functions */
|
||||
|
||||
WordList * split(char *string, char *separator);
|
||||
WordList * split(char *string, char *separator); // Tested
|
||||
|
||||
/* Settings functions */
|
||||
|
||||
@ -26,7 +30,7 @@ void fishLoop(Settings * settings);
|
||||
|
||||
char * fishReadLine();
|
||||
|
||||
int countSeparators(char *string, char *separators);
|
||||
int countSeparators(char *string, char *separators); // Tested
|
||||
|
||||
|
||||
int fishLoad(WordArray *array);
|
||||
|
@ -50,7 +50,6 @@ void freeWordArray(WordArray *array) {
|
||||
free(array->words);
|
||||
free(array);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,22 +7,22 @@
|
||||
|
||||
#include "fish_types.h"
|
||||
|
||||
void crash();
|
||||
void crash(); // Tested
|
||||
|
||||
char *getInsult();
|
||||
char *getInsult(); // Tested
|
||||
|
||||
void freeWordArray(WordArray *array);
|
||||
void freeWordArray(WordArray *array); // Tested
|
||||
|
||||
WordList * createWordList();
|
||||
WordList * createWordList(); // Tested
|
||||
|
||||
void addWordList(WordList *list, char *word);
|
||||
void addWordList(WordList *list, char *word); // Tested
|
||||
|
||||
void removeWordList(WordList *list);
|
||||
void removeWordList(WordList *list); // Tested
|
||||
|
||||
void freeWordList(WordList *list);
|
||||
void freeWordList(WordList *list); // Tested
|
||||
|
||||
WordArray * wordListToWordArray(WordList *list);
|
||||
WordArray * wordListToWordArray(WordList *list); // Tested
|
||||
|
||||
WordList * wordArrayToWordList(WordArray * array);
|
||||
WordList * wordArrayToWordList(WordArray * array); // Tested
|
||||
|
||||
#endif //FISH_FISH_UTILS_H
|
||||
|
Reference in New Issue
Block a user