mirror of
https://github.com/datarhei/core.git
synced 2025-09-27 04:16:25 +08:00
Fix memfs concurrent read and write performance
This commit is contained in:
24
glob/glob_test.go
Normal file
24
glob/glob_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package glob
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestPatterns(t *testing.T) {
|
||||
ok, err := Match("**/a/b/**", "/s3/a/b/test.m3u8", '/')
|
||||
|
||||
require.NoError(t, err)
|
||||
require.True(t, ok)
|
||||
|
||||
ok, err = Match("**/a/b/**", "/a/b/test.m3u8", '/')
|
||||
|
||||
require.NoError(t, err)
|
||||
require.True(t, ok)
|
||||
|
||||
ok, err = Match("{/memfs,}/a/b/**", "/a/b/test.m3u8", '/')
|
||||
|
||||
require.NoError(t, err)
|
||||
require.True(t, ok)
|
||||
}
|
Reference in New Issue
Block a user