Add a test case for ufw-docker--list-number

This commit is contained in:
Chai Feng 2019-10-19 12:30:41 +02:00
parent 491324a1f4
commit bcfca79758

View File

@ -419,3 +419,14 @@ test-ufw-docker--list-name-80-udp() {
test-ufw-docker--list-name-80-udp-assert() { test-ufw-docker--list-name-80-udp-assert() {
grep "# allow foo\\( 80\\/udp\\)\\?\$" grep "# allow foo\\( 80\\/udp\\)\\?\$"
} }
test-ufw-docker--list-number() {
@mocktrue ufw-docker--list foo 53 udp
load-ufw-docker-function ufw-docker--list-number
ufw-docker--list-number foo 53 udp
}
test-ufw-docker--list-number-assert() {
sed -e 's/^\[[[:blank:]]*\([[:digit:]]\+\)\].*/\1/'
}