mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
time: add more detailed error descriptions, add custom format parsing with time.parse_format (#18257)
This commit is contained in:
parent
0bbbf1e801
commit
e97aff8742
7 changed files with 438 additions and 27 deletions
|
@ -404,6 +404,13 @@ fn test_contains_any() {
|
|||
assert !''.contains_any('')
|
||||
}
|
||||
|
||||
fn test_contains_only() {
|
||||
assert '23885'.contains_only('0123456789')
|
||||
assert '23gg885'.contains_only('01g23456789')
|
||||
assert !'hello;'.contains_only('hello')
|
||||
assert !''.contains_only('')
|
||||
}
|
||||
|
||||
fn test_contains_any_substr() {
|
||||
s := 'Some random text'
|
||||
assert s.contains_any_substr(['false', 'not', 'rand'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue