2022-11-27 21:08:34 +01:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestConfigSave(t *testing.T) {
|
|
|
|
c := GetConfig()
|
|
|
|
c.memoryPassword = "hideme"
|
2023-02-15 22:08:17 +01:00
|
|
|
c.IdentityFile = "test.id"
|
2022-11-27 21:08:34 +01:00
|
|
|
c.Chunksize = 10000000
|
|
|
|
c.SavePassword = true
|
|
|
|
c.SavedPassword = "stupid"
|
|
|
|
c.Save("test.cfg")
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestConfigLoad(t *testing.T) {
|
|
|
|
_ = GetConfig().Load("test.cfg")
|
|
|
|
println(GetConfig().Chunksize)
|
|
|
|
}
|