mirror of
https://github.com/restic/restic.git
synced 2025-10-09 07:33:53 +00:00
location: Make ParseConfig-test backend agnostic
The backend specific parts of the test are now directly handled by the respective backend. Duplicate tests were removed.
This commit is contained in:
@@ -11,6 +11,34 @@ var configTests = []test.ConfigTestData[Config]{
|
||||
Path: "/some/path",
|
||||
Connections: 2,
|
||||
}},
|
||||
{S: "local:dir1/dir2", Cfg: Config{
|
||||
Path: "dir1/dir2",
|
||||
Connections: 2,
|
||||
}},
|
||||
{S: "local:../dir1/dir2", Cfg: Config{
|
||||
Path: "../dir1/dir2",
|
||||
Connections: 2,
|
||||
}},
|
||||
{S: "local:/dir1:foobar/dir2", Cfg: Config{
|
||||
Path: "/dir1:foobar/dir2",
|
||||
Connections: 2,
|
||||
}},
|
||||
{S: `local:\dir1\foobar\dir2`, Cfg: Config{
|
||||
Path: `\dir1\foobar\dir2`,
|
||||
Connections: 2,
|
||||
}},
|
||||
{S: `local:c:\dir1\foobar\dir2`, Cfg: Config{
|
||||
Path: `c:\dir1\foobar\dir2`,
|
||||
Connections: 2,
|
||||
}},
|
||||
{S: `local:C:\Users\appveyor\AppData\Local\Temp\1\restic-test-879453535\repo`, Cfg: Config{
|
||||
Path: `C:\Users\appveyor\AppData\Local\Temp\1\restic-test-879453535\repo`,
|
||||
Connections: 2,
|
||||
}},
|
||||
{S: `local:c:/dir1/foobar/dir2`, Cfg: Config{
|
||||
Path: `c:/dir1/foobar/dir2`,
|
||||
Connections: 2,
|
||||
}},
|
||||
}
|
||||
|
||||
func TestParseConfig(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user