mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
test: Add "chamuyero", a tool to test line-oriented I/O
This patch adds "chamuyero", a a tool to test and validate line-oriented commands and servers. It can launch and communicate with other processes, and follow a script of line-oriented request-response, validating the dialog as it goes along. This can be used to test line-oriented network protocols (such as SMTP) or interactive command-line tools. It will be used in follow up patches to test new commands and functionality.
This commit is contained in:
@@ -5,11 +5,11 @@ function init() {
|
||||
set -v
|
||||
fi
|
||||
|
||||
export UTILDIR="$( realpath `dirname "${BASH_SOURCE[0]}"` )"
|
||||
|
||||
export TBASE="$(realpath `dirname ${0}`)"
|
||||
cd ${TBASE}
|
||||
|
||||
export UTILDIR="$(realpath ${TBASE}/../util/)"
|
||||
|
||||
if [ "${RACE}" == "1" ]; then
|
||||
RACE="-race"
|
||||
fi
|
||||
@@ -69,6 +69,10 @@ function mail_diff() {
|
||||
${UTILDIR}/mail_diff "$@"
|
||||
}
|
||||
|
||||
function chamuyero() {
|
||||
${UTILDIR}/chamuyero "$@"
|
||||
}
|
||||
|
||||
function success() {
|
||||
echo success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user