17 lines
295 B
Bash
17 lines
295 B
Bash
|
readonly MSG=("to jest pierwsza wiadomość" "to jest druga wiadomość")
|
||
|
|
||
|
function do_test() {
|
||
|
python alice.py <(echo "${MSG[0]}") <(echo "${MSG[1]}") &
|
||
|
alice=$!
|
||
|
sleep 1
|
||
|
|
||
|
if [ "${MSG[$1]}" != "$(python bob.py $1)" ]; then
|
||
|
echo "Failed in test $1"
|
||
|
fi
|
||
|
|
||
|
wait $alice
|
||
|
}
|
||
|
|
||
|
do_test 0
|
||
|
do_test 1
|