mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-08 13:13:47 -05:00
add _isFQDN_
This commit is contained in:
@@ -106,6 +106,21 @@ teardown() {
|
|||||||
assert_failure
|
assert_failure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "_isFQDN_: true" {
|
||||||
|
run _isFQDN_ "some.domain.com"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "_isFQDN_: false" {
|
||||||
|
run _isFQDN_ "testing"
|
||||||
|
assert_failure
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "_isFQDN_: false2" {
|
||||||
|
run _isFQDN_ "192.168.1.1"
|
||||||
|
assert_failure
|
||||||
|
}
|
||||||
|
|
||||||
@test "_isIPv4_: true" {
|
@test "_isIPv4_: true" {
|
||||||
run _isIPv4_ "192.168.1.1"
|
run _isIPv4_ "192.168.1.1"
|
||||||
assert_success
|
assert_success
|
||||||
|
|||||||
Reference in New Issue
Block a user