From fc966f297cc163254220c930a565484abde207d9 Mon Sep 17 00:00:00 2001 From: Oskar Date: Sun, 18 Feb 2024 18:42:40 +0100 Subject: Organised test directory and did some logic fixes to smode --- test/testgetline.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 test/testgetline.c (limited to 'test/testgetline.c') diff --git a/test/testgetline.c b/test/testgetline.c deleted file mode 100644 index d186439..0000000 --- a/test/testgetline.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include -#include -#include "7ed.h" - -#define USAGE "" -#define PROGRAM_NAME "7ed" - -int main (int argc, char *argv[]) { - - -int opt; -int returnval; -long focus = 100; -char *line; -while ((opt = getopt(argc, argv, "i:")) != -1) { - switch (opt) { - - case 'i': - - returnval = GET_LINE(optarg, focus, &line); - if (returnval == 1) { - return EXIT_FAILURE; - } - printf("%s", line); - free(line); - - break; - - default: - fprintf(stderr, "%s", USAGE); - return EXIT_FAILURE; - } -} - - if (argc == 1) { - fprintf(stderr, "%s: Please provide a file.\n%s", argv[0], USAGE); - return EXIT_FAILURE; - } - -return EXIT_SUCCESS; -// TEST! -// LINE 44 YOOOOOOOOOOOOOOO!! -- cgit v1.2.3