--- /dev/null
+#define TEST_DIR "./test_files/"
+#define RESULT_DIR "./results/"
+#define SEPARATOR "---------------------\n"
+
+int my_open(const char *fname)
+{
+ int fd;
+ char *path;
+
+ path = ft_strdup(TEST_DIR);
+ ft_strncat_alloc(&path, fname);
+ fd = open(path, O_RDONLY);
+ return (fd);
+}
+
+int create_res_file(const char *fname)
+{
+ int fd;
+ char *path;
+
+ path = ft_strdup(RESULT_DIR);
+ ft_strncat_alloc(&path, fname);
+ fd = open(path, O_WRONLY | O_CREAT);
+ return (fd);
+}
+
+void test_gnl(int testfd, int resfd)
+{
+ char *line;
+
+ line = get_next_line(testfd);
+ while (line)
+ {
+ ft_pustr_fd(resfd, line);
+ ft_putstr_fd(resfd, SEPARATOR);
+ free(line);
+ line = get_next_line(testfd);
+ }
+ return ;
+}
+
+int main(int argc, char **argv)
+{
+ int i;
+ int testfd;
+ int resfd;
+
+ if (argc < 2)
+ {
+ ft_printf("%s\n", "Error: Not enough arguments.");
+ return (-1);
+ }
+ i = 1;
+ while (i < argc)
+ {
+ test = my_open(argv[i]);
+ result = create_res_file(argv[i]);
+ test_gnl(testfd, resfd);
+ close(testfd);
+ close(resfd);
+ ++i;
+ }
+ return (0);
+}