aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/020_io_H48_read_write/io_H48_tests.c8
-rw-r--r--test/021_io_SRC_write/io_SRC_tests.c8
-rw-r--r--test/023_io_LST_write/io_LST_tests.c8
3 files changed, 15 insertions, 9 deletions
diff --git a/test/020_io_H48_read_write/io_H48_tests.c b/test/020_io_H48_read_write/io_H48_tests.c
index fafd396..705356c 100644
--- a/test/020_io_H48_read_write/io_H48_tests.c
+++ b/test/020_io_H48_read_write/io_H48_tests.c
@@ -1,11 +1,13 @@
1#include "../test.h" 1#include "../test.h"
2 2
3int main(void) { 3int main(void) {
4 char *c, str[STRLENMAX]; 4 char str[STRLENMAX], *aux;
5 cube_t cube; 5 cube_t cube;
6 6
7 for (c = str; (*c = getchar()) != EOF; c++) ; 7 aux = str;
8 *c = '\0'; 8 while (fgets(aux, STRLENMAX, stdin) != NULL)
9 while (*aux != '\n')
10 aux++;
9 11
10 cube = readcube("H48", str); 12 cube = readcube("H48", str);
11 13
diff --git a/test/021_io_SRC_write/io_SRC_tests.c b/test/021_io_SRC_write/io_SRC_tests.c
index ca33d1e..c427c6c 100644
--- a/test/021_io_SRC_write/io_SRC_tests.c
+++ b/test/021_io_SRC_write/io_SRC_tests.c
@@ -1,11 +1,13 @@
1#include "../test.h" 1#include "../test.h"
2 2
3int main(void) { 3int main(void) {
4 char *c, str[STRLENMAX]; 4 char str[STRLENMAX], *aux;
5 cube_t cube; 5 cube_t cube;
6 6
7 for (c = str; (*c = getchar()) != EOF; c++) ; 7 aux = str;
8 *c = '\0'; 8 while (fgets(aux, STRLENMAX, stdin) != NULL)
9 while (*aux != '\n')
10 aux++;
9 11
10 cube = readcube("H48", str); 12 cube = readcube("H48", str);
11 13
diff --git a/test/023_io_LST_write/io_LST_tests.c b/test/023_io_LST_write/io_LST_tests.c
index 3f42d7a..45cc203 100644
--- a/test/023_io_LST_write/io_LST_tests.c
+++ b/test/023_io_LST_write/io_LST_tests.c
@@ -8,11 +8,13 @@ cube_t readcube(char *, char *);
8void writecube(char *, cube_t, char *); 8void writecube(char *, cube_t, char *);
9 9
10int main(void) { 10int main(void) {
11 char *c, str[STRLENMAX]; 11 char str[STRLENMAX], *aux;
12 cube_t cube; 12 cube_t cube;
13 13
14 for (c = str; (*c = getchar()) != EOF; c++) ; 14 aux = str;
15 *c = '\0'; 15 while (fgets(aux, STRLENMAX, stdin) != NULL)
16 while (*aux != '\n')
17 aux++;
16 18
17 cube = readcube("H48", str); 19 cube = readcube("H48", str);
18 20

Generated with cgit - Back to sebastiano.tronto.net