diff --git a/d01/ex04/Makefile.replace b/d01/ex04/Makefile.replace deleted file mode 100644 index 3f95f8a..0000000 --- a/d01/ex04/Makefile.replace +++ /dev/null @@ -1,66 +0,0 @@ -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # -# . name = value . name is case sensitive # -# VARIABLES . or name = value \ . use VPATH only for .c # -# . value . or .cpp # -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - -NAME = sed - -CC = c++ -CFLAGS = -Wall -Wextra -Werror $(INCLUDES) -std=c++98 -g3 - -VPATH = $(D_SRCS) - -LIBS = - -INCLUDES = -I$(D_HEADERS) - -D_SRCS = . -SRCS = main.cpp \ - Sed.cpp - -D_HEADERS = . -HEADERS = Sed.hpp - -D_OBJS = builds -OBJS = $(SRCS:%.cpp=$(D_OBJS)/%.o) - -RM_D_OBJS = rm -rf $(D_OBJS) -ifeq "$(D_OBJS)" "." -RM_D_OBJS = -endif - - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # -# . target: prerequisites . $@ : target # -# RULES . recipe . $< : 1st prerequisite # -# . recipe . $^ : all prerequisites # -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - -all: $(NAME) - -$(D_OBJS)/%.o: %.cpp | $(D_OBJS) - $(CC) $(CFLAGS) -c $< -o $@ - -$(D_OBJS): - mkdir $@ - -$(OBJS): $(HEADERS:%=$(D_HEADERS)/%) - -$(NAME): $(OBJS) - $(CC) $(OBJS) -o $@ $(LIBS) - -leaks: $(NAME) - valgrind --leak-check=full --show-leak-kinds=all ./$(NAME) Makefile OBJS BANANE - -clean: - rm -f $(OBJS) - rm -f *.replace - -fclean: clean - rm -f $(NAME) - $(RM_D_OBJS) - -re: fclean all - -.PHONY : all clean fclean re bonus run valgrind diff --git a/d01/ex04/unitests/file_does_not_exist.replace b/d01/ex04/unitests/file_does_not_exist.replace deleted file mode 100644 index e69de29..0000000 diff --git a/d01/ex04/unitests/test.sh b/d01/ex04/unitests/test.sh index 6626ecc..bf7fb23 100644 --- a/d01/ex04/unitests/test.sh +++ b/d01/ex04/unitests/test.sh @@ -1,10 +1,11 @@ #!/bin/bash cd $(dirname $0) source ./colors.sh -mkdir -p test_log +mkdir -p files_log make -C ../ &> /dev/null EXECUTABLE="sed" +FILES_LOG="files_log" LEAKS="" if [ $1 == "leaks" ] || [ $1 == "valgrind" ] then @@ -27,7 +28,9 @@ fi fi if [ -f $TESTNAME ];then - mv $TESTNAME $TESTNAME.replace ./test_log;fi + mv $TESTNAME ./$FILES_LOG;fi + if [ -f $TESTNAME.replace ];then + mv $TESTNAME.replace ./$FILES_LOG;fi } # TEST 1 ######################################## diff --git a/d01/ex04/unitests/test13.replace b/d01/ex04/unitests/test13.replace deleted file mode 100644 index e69de29..0000000 diff --git a/d01/ex04/unitests/test_log/empty_find b/d01/ex04/unitests/test_log/empty_find deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/empty_find +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/empty_find.replace b/d01/ex04/unitests/test_log/empty_find.replace deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/empty_find.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/empty_find_and_replacement b/d01/ex04/unitests/test_log/empty_find_and_replacement deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/empty_find_and_replacement +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/empty_find_and_replacement.replace b/d01/ex04/unitests/test_log/empty_find_and_replacement.replace deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/empty_find_and_replacement.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/empty_replacement b/d01/ex04/unitests/test_log/empty_replacement deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/empty_replacement +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/empty_replacement.replace b/d01/ex04/unitests/test_log/empty_replacement.replace deleted file mode 100644 index c6854d9..0000000 --- a/d01/ex04/unitests/test_log/empty_replacement.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more ters, my hert is dry -I don't lugh nd I don't cry -I don't think bout you ll the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/first_letter_lure b/d01/ex04/unitests/test_log/first_letter_lure deleted file mode 100644 index 671f5ed..0000000 --- a/d01/ex04/unitests/test_log/first_letter_lure +++ /dev/null @@ -1 +0,0 @@ -test de mmdr foubar diff --git a/d01/ex04/unitests/test_log/first_letter_lure.replace b/d01/ex04/unitests/test_log/first_letter_lure.replace deleted file mode 100644 index 991bdd3..0000000 --- a/d01/ex04/unitests/test_log/first_letter_lure.replace +++ /dev/null @@ -1 +0,0 @@ -test de m||| foubar diff --git a/d01/ex04/unitests/test_log/half_replacement_lure b/d01/ex04/unitests/test_log/half_replacement_lure deleted file mode 100644 index a74f1c0..0000000 --- a/d01/ex04/unitests/test_log/half_replacement_lure +++ /dev/null @@ -1,2 +0,0 @@ -trouve ce mot toutouille -et celui-la toutoutouille diff --git a/d01/ex04/unitests/test_log/half_replacement_lure.replace b/d01/ex04/unitests/test_log/half_replacement_lure.replace deleted file mode 100644 index 8072725..0000000 --- a/d01/ex04/unitests/test_log/half_replacement_lure.replace +++ /dev/null @@ -1,2 +0,0 @@ -trouve ce mot |||||||||| -et celui-la tou|||||||||| \ No newline at end of file diff --git a/d01/ex04/unitests/test_log/multi_line_file b/d01/ex04/unitests/test_log/multi_line_file deleted file mode 100644 index 23b0c96..0000000 --- a/d01/ex04/unitests/test_log/multi_line_file +++ /dev/null @@ -1,5 +0,0 @@ -ce fichier -contient -plusieurs lignes -les unes au dessus des autres -youhouuu ioieux diff --git a/d01/ex04/unitests/test_log/multi_line_file.replace b/d01/ex04/unitests/test_log/multi_line_file.replace deleted file mode 100644 index a573c23..0000000 --- a/d01/ex04/unitests/test_log/multi_line_file.replace +++ /dev/null @@ -1,5 +0,0 @@ -ce fich++r -cont++nt -plus++urs lignes -les unes au dessus des autres -youhouuu io++ux diff --git a/d01/ex04/unitests/test_log/multiline_replacement b/d01/ex04/unitests/test_log/multiline_replacement deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/multiline_replacement +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/multiline_replacement.replace b/d01/ex04/unitests/test_log/multiline_replacement.replace deleted file mode 100644 index 3a2e850..0000000 --- a/d01/ex04/unitests/test_log/multiline_replacement.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is doo -oooooooolaugh and I don't coo -oooooooothink about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/one_line_file b/d01/ex04/unitests/test_log/one_line_file deleted file mode 100644 index 8d1c8b6..0000000 --- a/d01/ex04/unitests/test_log/one_line_file +++ /dev/null @@ -1 +0,0 @@ - diff --git a/d01/ex04/unitests/test_log/one_line_file.replace b/d01/ex04/unitests/test_log/one_line_file.replace deleted file mode 100644 index b6fc4c6..0000000 --- a/d01/ex04/unitests/test_log/one_line_file.replace +++ /dev/null @@ -1 +0,0 @@ -hello \ No newline at end of file diff --git a/d01/ex04/unitests/test_log/replace_one_character b/d01/ex04/unitests/test_log/replace_one_character deleted file mode 100644 index 922f88c..0000000 --- a/d01/ex04/unitests/test_log/replace_one_character +++ /dev/null @@ -1 +0,0 @@ -....................................................; diff --git a/d01/ex04/unitests/test_log/replace_one_character.replace b/d01/ex04/unitests/test_log/replace_one_character.replace deleted file mode 100644 index d3b95af..0000000 --- a/d01/ex04/unitests/test_log/replace_one_character.replace +++ /dev/null @@ -1 +0,0 @@ -++++++++++++++++++++++++++++++++++++++++++++++++++++; diff --git a/d01/ex04/unitests/test_log/replace_two_characters b/d01/ex04/unitests/test_log/replace_two_characters deleted file mode 100644 index 0880dee..0000000 --- a/d01/ex04/unitests/test_log/replace_two_characters +++ /dev/null @@ -1,2 +0,0 @@ -...................................................; -. . . . . . . . . . . . . . . . . . . . . . . . . .; diff --git a/d01/ex04/unitests/test_log/replace_two_characters.replace b/d01/ex04/unitests/test_log/replace_two_characters.replace deleted file mode 100644 index 80f497e..0000000 --- a/d01/ex04/unitests/test_log/replace_two_characters.replace +++ /dev/null @@ -1,2 +0,0 @@ -++++++++++++++++++++++++++++++++++++++++++++++++++.; -. . . . . . . . . . . . . . . . . . . . . . . . . .; diff --git a/d01/ex04/unitests/test_log/special_character_' b/d01/ex04/unitests/test_log/special_character_' deleted file mode 100644 index 05ee8e4..0000000 --- a/d01/ex04/unitests/test_log/special_character_' +++ /dev/null @@ -1,27 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why - -You have to go out of my door -And leave just like you did before -I know I said that I was sure -But rich men can't imagine poor. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told - -Little me and little you -Kept doing all the things they do -They never really think it through -Like I can never think you're true - -Here I go again - the blame -The guilt, the pain, the hurt, the shame -The founding fathers of our plane -That's stuck in heavy clouds of rain. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told diff --git a/d01/ex04/unitests/test_log/special_character_'.replace b/d01/ex04/unitests/test_log/special_character_'.replace deleted file mode 100644 index 7292451..0000000 --- a/d01/ex04/unitests/test_log/special_character_'.replace +++ /dev/null @@ -1,27 +0,0 @@ -No more tears, my heart is dry -I do000 laugh and I do000 cry -I do000 think about you all the time -But when I do - I wonder why - -You have to go out of my door -And leave just like you did before -I know I said that I was sure -But rich men ca000 imagine poor. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told - -Little me and little you -Kept doing all the things they do -They never really think it through -Like I can never think you're true - -Here I go again - the blame -The guilt, the pain, the hurt, the shame -The founding fathers of our plane -That's stuck in heavy clouds of rain. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told diff --git a/d01/ex04/unitests/test_log/test1 b/d01/ex04/unitests/test_log/test1 deleted file mode 100644 index 8d1c8b6..0000000 --- a/d01/ex04/unitests/test_log/test1 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/d01/ex04/unitests/test_log/test1.replace b/d01/ex04/unitests/test_log/test1.replace deleted file mode 100644 index b6fc4c6..0000000 --- a/d01/ex04/unitests/test_log/test1.replace +++ /dev/null @@ -1 +0,0 @@ -hello \ No newline at end of file diff --git a/d01/ex04/unitests/test_log/test10 b/d01/ex04/unitests/test_log/test10 deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test10 +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test10.replace b/d01/ex04/unitests/test_log/test10.replace deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test10.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test11 b/d01/ex04/unitests/test_log/test11 deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test11 +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test11.replace b/d01/ex04/unitests/test_log/test11.replace deleted file mode 100644 index c6854d9..0000000 --- a/d01/ex04/unitests/test_log/test11.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more ters, my hert is dry -I don't lugh nd I don't cry -I don't think bout you ll the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test12 b/d01/ex04/unitests/test_log/test12 deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test12 +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test12.replace b/d01/ex04/unitests/test_log/test12.replace deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test12.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test13 b/d01/ex04/unitests/test_log/test13 deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test13 +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test13.replace b/d01/ex04/unitests/test_log/test13.replace deleted file mode 100644 index e69de29..0000000 diff --git a/d01/ex04/unitests/test_log/test2 b/d01/ex04/unitests/test_log/test2 deleted file mode 100644 index 23b0c96..0000000 --- a/d01/ex04/unitests/test_log/test2 +++ /dev/null @@ -1,5 +0,0 @@ -ce fichier -contient -plusieurs lignes -les unes au dessus des autres -youhouuu ioieux diff --git a/d01/ex04/unitests/test_log/test2.replace b/d01/ex04/unitests/test_log/test2.replace deleted file mode 100644 index a573c23..0000000 --- a/d01/ex04/unitests/test_log/test2.replace +++ /dev/null @@ -1,5 +0,0 @@ -ce fich++r -cont++nt -plus++urs lignes -les unes au dessus des autres -youhouuu io++ux diff --git a/d01/ex04/unitests/test_log/test3 b/d01/ex04/unitests/test_log/test3 deleted file mode 100644 index 922f88c..0000000 --- a/d01/ex04/unitests/test_log/test3 +++ /dev/null @@ -1 +0,0 @@ -....................................................; diff --git a/d01/ex04/unitests/test_log/test3.replace b/d01/ex04/unitests/test_log/test3.replace deleted file mode 100644 index d3b95af..0000000 --- a/d01/ex04/unitests/test_log/test3.replace +++ /dev/null @@ -1 +0,0 @@ -++++++++++++++++++++++++++++++++++++++++++++++++++++; diff --git a/d01/ex04/unitests/test_log/test4 b/d01/ex04/unitests/test_log/test4 deleted file mode 100644 index 0880dee..0000000 --- a/d01/ex04/unitests/test_log/test4 +++ /dev/null @@ -1,2 +0,0 @@ -...................................................; -. . . . . . . . . . . . . . . . . . . . . . . . . .; diff --git a/d01/ex04/unitests/test_log/test4.replace b/d01/ex04/unitests/test_log/test4.replace deleted file mode 100644 index 80f497e..0000000 --- a/d01/ex04/unitests/test_log/test4.replace +++ /dev/null @@ -1,2 +0,0 @@ -++++++++++++++++++++++++++++++++++++++++++++++++++.; -. . . . . . . . . . . . . . . . . . . . . . . . . .; diff --git a/d01/ex04/unitests/test_log/test5 b/d01/ex04/unitests/test_log/test5 deleted file mode 100644 index 671f5ed..0000000 --- a/d01/ex04/unitests/test_log/test5 +++ /dev/null @@ -1 +0,0 @@ -test de mmdr foubar diff --git a/d01/ex04/unitests/test_log/test5.replace b/d01/ex04/unitests/test_log/test5.replace deleted file mode 100644 index 991bdd3..0000000 --- a/d01/ex04/unitests/test_log/test5.replace +++ /dev/null @@ -1 +0,0 @@ -test de m||| foubar diff --git a/d01/ex04/unitests/test_log/test6 b/d01/ex04/unitests/test_log/test6 deleted file mode 100644 index a74f1c0..0000000 --- a/d01/ex04/unitests/test_log/test6 +++ /dev/null @@ -1,2 +0,0 @@ -trouve ce mot toutouille -et celui-la toutoutouille diff --git a/d01/ex04/unitests/test_log/test6.replace b/d01/ex04/unitests/test_log/test6.replace deleted file mode 100644 index 8072725..0000000 --- a/d01/ex04/unitests/test_log/test6.replace +++ /dev/null @@ -1,2 +0,0 @@ -trouve ce mot |||||||||| -et celui-la tou|||||||||| \ No newline at end of file diff --git a/d01/ex04/unitests/test_log/test7 b/d01/ex04/unitests/test_log/test7 deleted file mode 100644 index 05ee8e4..0000000 --- a/d01/ex04/unitests/test_log/test7 +++ /dev/null @@ -1,27 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why - -You have to go out of my door -And leave just like you did before -I know I said that I was sure -But rich men can't imagine poor. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told - -Little me and little you -Kept doing all the things they do -They never really think it through -Like I can never think you're true - -Here I go again - the blame -The guilt, the pain, the hurt, the shame -The founding fathers of our plane -That's stuck in heavy clouds of rain. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told diff --git a/d01/ex04/unitests/test_log/test7.replace b/d01/ex04/unitests/test_log/test7.replace deleted file mode 100644 index 7292451..0000000 --- a/d01/ex04/unitests/test_log/test7.replace +++ /dev/null @@ -1,27 +0,0 @@ -No more tears, my heart is dry -I do000 laugh and I do000 cry -I do000 think about you all the time -But when I do - I wonder why - -You have to go out of my door -And leave just like you did before -I know I said that I was sure -But rich men ca000 imagine poor. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told - -Little me and little you -Kept doing all the things they do -They never really think it through -Like I can never think you're true - -Here I go again - the blame -The guilt, the pain, the hurt, the shame -The founding fathers of our plane -That's stuck in heavy clouds of rain. - -One day baby, we'll be old -Oh baby, we'll be old -And think of all the stories that we could have told diff --git a/d01/ex04/unitests/test_log/test8 b/d01/ex04/unitests/test_log/test8 deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test8 +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test8.replace b/d01/ex04/unitests/test_log/test8.replace deleted file mode 100644 index 3a2e850..0000000 --- a/d01/ex04/unitests/test_log/test8.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is doo -oooooooolaugh and I don't coo -oooooooothink about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test9 b/d01/ex04/unitests/test_log/test9 deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test9 +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why diff --git a/d01/ex04/unitests/test_log/test9.replace b/d01/ex04/unitests/test_log/test9.replace deleted file mode 100644 index 652b428..0000000 --- a/d01/ex04/unitests/test_log/test9.replace +++ /dev/null @@ -1,4 +0,0 @@ -No more tears, my heart is dry -I don't laugh and I don't cry -I don't think about you all the time -But when I do - I wonder why