Add another split() test for pattern delimiters

develop
lethosor 2021-07-03 00:33:28 -04:00
parent da3b522061
commit f9627a0cfb
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 2 additions and 0 deletions

@ -33,6 +33,8 @@ function test.split()
expect.table_eq({'hello','world'}, ('hello.world'):split('.', true), expect.table_eq({'hello','world'}, ('hello.world'):split('.', true),
'ensure literal interpretation when plain is true') 'ensure literal interpretation when plain is true')
expect.table_eq({'', '', '', ''}, ('abc'):split('.'),
'ensure pattern interpretation when plain is false')
-- we don't actually care what this returns, just that it does return -- we don't actually care what this returns, just that it does return
expect.true_(('hello world'):split('.*'), 'ensure no infinite loop') expect.true_(('hello world'):split('.*'), 'ensure no infinite loop')