mirror of
https://github.com/rclone/rclone.git
synced 2025-06-04 03:04:36 +08:00
b2: fix versions and .files with no extension - fixes #5244
This commit is contained in:
@ -26,6 +26,8 @@ func TestVersionAdd(t *testing.T) {
|
||||
{t0, "potato-v2001-02-03-040506-123.txt", "potato-v2001-02-03-040506-123-v1970-01-01-010101-123.txt"},
|
||||
{t0, "123.!!lipps", "123-v1970-01-01-010101-123.!!lipps"},
|
||||
{t1, "potato", "potato-v2001-02-03-040506-123"},
|
||||
{t1, ".potato", ".potato-v2001-02-03-040506-123"},
|
||||
{t1, ".potato.conf", ".potato-v2001-02-03-040506-123.conf"},
|
||||
{t1, "", "-v2001-02-03-040506-123"},
|
||||
} {
|
||||
actual := version.Add(test.in, test.t)
|
||||
@ -43,6 +45,8 @@ func TestVersionRemove(t *testing.T) {
|
||||
{"potato-v1970-01-01-010101-123.txt", t0r, "potato.txt"},
|
||||
{"potato-v2001-02-03-040506-123-v1970-01-01-010101-123.txt", t0r, "potato-v2001-02-03-040506-123.txt"},
|
||||
{"potato-v2001-02-03-040506-123", t1, "potato"},
|
||||
{".potato-v2001-02-03-040506-123", t1, ".potato"},
|
||||
{".potato-v2001-02-03-040506-123.conf", t1, ".potato.conf"},
|
||||
{"-v2001-02-03-040506-123", t1, ""},
|
||||
{"potato-v2A01-02-03-040506-123", emptyT, "potato-v2A01-02-03-040506-123"},
|
||||
{"potato-v2001-02-03-040506=123", emptyT, "potato-v2001-02-03-040506=123"},
|
||||
|
Reference in New Issue
Block a user