added regex

This commit is contained in:
Dylan Araps
2018-06-15 08:26:06 +10:00
parent dd7ae08a3b
commit 9548d5b111
2 changed files with 51 additions and 0 deletions

View File

@@ -12,6 +12,11 @@ test_trim_all() {
assert_equals "$result" "Hello, World"
}
test_regex() {
result="$(regex " Hello, World" '^[[:space:]]*(.*)')"
assert_equals "$result" "Hello, World"
}
test_lower() {
result="$(lower "HeLlO")"
assert_equals "$result" "hello"
@@ -130,6 +135,7 @@ main() {
test_trim_string
test_trim_all
test_regex
test_lower
test_upper
test_trim_quotes