aboutsummaryrefslogtreecommitdiff
path: root/test/024_io_LST_read/io_LST_tests.c
blob: 59cf89a7e6b4581b44021428e7f6756d2d5f1217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "../test.h"

int main(void) {
	char str[STRLENMAX], *aux;
	cube_t cube;

        aux = str;
	while (fgets(aux, STRLENMAX, stdin) != NULL)
		while (*aux != '\n')
			aux++;

	cube = cube_read("LST", str);

	if (cube_error(cube)) {
		printf("Error reading cube\n");
	} else if (!cube_solvable(cube)) {
		printf("Cube is not solvable\n");
	} else {
		cube_write("H48", cube, str);
		printf("%s\n", str);
	}

	return 0;
}

Generated with cgit - Back to sebastiano.tronto.net