mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
dovecot-auth-cli: Test invalid arguments handling
This patch adds a minor test to dovecot-auth-cli to verify that the check for invalid number of arguments is working as expected. It's mostly for consistency, as the utility is only used for testing purposes.
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
// CLI used for testing the dovecot authentication package.
|
// CLI used for testing the dovecot authentication package.
|
||||||
//
|
//
|
||||||
// NOT for production use.
|
// NOT for production use.
|
||||||
// +build !coverage
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ else
|
|||||||
go build $GOFLAGS -tags="$GOTAGS" dovecot-auth-cli.go
|
go build $GOFLAGS -tags="$GOTAGS" dovecot-auth-cli.go
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! ./dovecot-auth-cli lalala 2>&1 | grep -q "invalid arguments"; then
|
||||||
|
echo "cli worked with invalid arguments"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
for i in *.cmy; do
|
for i in *.cmy; do
|
||||||
if ! chamuyero $i > $i.log 2>&1 ; then
|
if ! chamuyero $i > $i.log 2>&1 ; then
|
||||||
echo "# Test $i failed, log follows"
|
echo "# Test $i failed, log follows"
|
||||||
|
|||||||
Reference in New Issue
Block a user