summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar <[email protected]>2023-12-13 23:00:58 +0100
committerOskar <[email protected]>2023-12-13 23:00:58 +0100
commit69251d50ea6c088add4769ce61473a472ca53da2 (patch)
tree2c181592fcad7008377cf8aefbf66053579f8126
parent84b2e02080b5fded466e18694426d7d26db8e194 (diff)
Ok it wasnt fixed but now i fixed it for real this time
-rw-r--r--editmode.c3
-rw-r--r--test/endnewlinetest2
-rw-r--r--test/newlinetest3
3 files changed, 6 insertions, 2 deletions
diff --git a/editmode.c b/editmode.c
index d89a0d5..68657d6 100644
--- a/editmode.c
+++ b/editmode.c
@@ -144,12 +144,13 @@ int NEW_LINE(char filename[]) { // doin this test again
FILE *file;
file = fopen(filename, "a");
fputc('\n', file);
+ fputc('\n', file);
fclose(file);
return 0;
}
}
- printf("continuing\n");
+
char *line; // line is the line before the newline
// line2 is the line right after line
size_t start; // start is the position at the start of line
diff --git a/test/endnewlinetest b/test/endnewlinetest
index 4f02b0d..1727e1a 100644
--- a/test/endnewlinetest
+++ b/test/endnewlinetest
@@ -1 +1,3 @@
And thus, the new line bug was fixed... I think.
+aasadasdasd
+asdasd \ No newline at end of file
diff --git a/test/newlinetest b/test/newlinetest
index 051c298..0b669b6 100644
--- a/test/newlinetest
+++ b/test/newlinetest
@@ -1,9 +1,10 @@
1
2
3
+4
5
6
7
8
9
-10
+10 \ No newline at end of file