From 3d96d83986a50c0a6e14c905cb6494e59467e79c Mon Sep 17 00:00:00 2001 From: AZEN-SGG Date: Sat, 21 Dec 2024 20:58:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BB=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=B2?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=20=D1=81=D0=BD=D0=BE=D0=B2=D0=B0...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/compile-and-test.yml | 8 ++++++-- ComputationalGeometry/6Ex/tools.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) 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}; }