mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-16 22:10:26 +00:00
Ignore user-defined runtime files in buffer test and rtfiles test
When initializing runtime files (syntax files etc) in tests, initialize built-in runtime files only, to ensure that the tests are not affected by whatever is in ~/.config/micro/ on the test machine. micro_test.go already ensures that, by using its own temporary directory as an (empty) config directory. So we only need to fix buffer_test.go and rtfiles_test.go. In those tests, don't repeat the same dance with a temporary directory, instead just ignore the config directory.
This commit is contained in:
parent
baca0e5cb2
commit
c5d32f625b
2 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ type operation struct {
|
|||
|
||||
func init() {
|
||||
ulua.L = lua.NewState()
|
||||
config.InitRuntimeFiles(true)
|
||||
config.InitRuntimeFiles(false)
|
||||
config.InitGlobalSettings()
|
||||
config.GlobalSettings["backup"] = false
|
||||
config.GlobalSettings["fastdirty"] = true
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
InitRuntimeFiles(true)
|
||||
InitRuntimeFiles(false)
|
||||
}
|
||||
|
||||
func TestAddFile(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue