Другой способ
This commit is contained in:
parent
04d3077412
commit
8429487f57
1 changed files with 2 additions and 6 deletions
8
.github/workflows/compile-and-test.yml
vendored
8
.github/workflows/compile-and-test.yml
vendored
|
@ -48,12 +48,8 @@ jobs:
|
|||
for file in t/*; do
|
||||
echo "Testing with file: $file"
|
||||
|
||||
# Создаём временный файл ввода
|
||||
echo "0" > input.txt
|
||||
echo "$file" >> input.txt
|
||||
|
||||
# Запускаем программу с вводом через файл
|
||||
./a.out < input.txt
|
||||
# Передаём последовательный ввод
|
||||
printf "0\n$file\n" | ./a.out
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "::error::Test failed for $file"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue