Реализовал последовательный ввод снова...

This commit is contained in:
AZEN-SGG 2024-12-21 20:58:23 +03:00
parent 7183b421ad
commit 3d96d83986
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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};
}