diff --git a/.github/workflows/compile-and-test.yml b/.github/workflows/compile-and-test.yml index 8eb424e..73cdc82 100644 --- a/.github/workflows/compile-and-test.yml +++ b/.github/workflows/compile-and-test.yml @@ -48,8 +48,12 @@ jobs: for file in t/*; do echo "Testing with file: $file" - # Создаём последовательный ввод для программы - (echo "0"; echo "$file") | ./a.out + # Создаём временный файл ввода + echo "0" > input.txt + echo "$file" >> input.txt + + # Запускаем программу с вводом через файл + ./a.out < input.txt if [ $? -ne 0 ]; then echo "::error::Test failed for $file" exit 1 diff --git a/ComputationalGeometry/6Ex/tools.c b/ComputationalGeometry/6Ex/tools.c index 5a8edc3..0dc194e 100644 --- a/ComputationalGeometry/6Ex/tools.c +++ b/ComputationalGeometry/6Ex/tools.c @@ -7,6 +7,7 @@ points getPoints(void) { if (scanf("%d", &fileOrRandom) < 1) { printf("Enter error!\n"); + printf("Debug: fileOrRandom = %d\n", fileOrRandom); return (points){NULL, 0}; }